申請SAE

如果您發現本博客的外觀很難看,那是因為部分外觀文件被中國.國家.防火.牆屏.蔽所致!
請翻~牆!

我的Wordpress博客的地址: http://zhuyf.tk/
顯示具有 快速排序 標籤的文章。 顯示所有文章
顯示具有 快速排序 標籤的文章。 顯示所有文章

2012年2月20日 星期一

[動態規劃]OI練習題 最後的利益 9cwy 解題報告

【問題描述】
最近9C馬上就要和WY交收WOW的運營權了,9C為了最後的利益決定讓GM控制玩家上線時間。因為9C的小霸王伺服器總是容易爆滿,所以某伺服器中只剩一個玩家的位子,GM為了讓玩家在線時間總和最長。他將選擇一些上線時間不重複的玩家讓他們上線。我們假設某玩家下線以後,另一個玩家可以立即登入。但是GM又笨又懶,他希望你能幫他幫他寫一個程序來完成這個任務。
【輸入文件】
輸入文件第一行是一個正整數n,n<=10000,為玩家數量
一下n行每行含有兩個數t1、t2表示某玩家上線時段
【輸出文件】
輸出最長遊戲總時間

2012年1月31日 星期二

[經典算法]字符串的排序 (tyvj 1101)

試題:tyvj 1101  (http://tyvj.cpwz.cn/Problem_Show.asp?id=1101

【題目大意】
給你N(N<=10000)字符串,每個字符串長度小於256,把他們按字典序排序並輸出。

【分析】
C++的快排不是用來吃白飯的~直接調用C++的快排函數,0 ms 無壓力。
為什麼還有很多人會超時啊~




VijosNT Mini 2.0.5.6

#01: Accepted (0ms, 1212KB)
#02: Accepted (0ms, 1036KB)
#03: Accepted (0ms, 1192KB)
#04: Accepted (0ms, 880KB)
#05: Accepted (0ms, 1020KB)
#06: Accepted (0ms, 760KB)
#07: Accepted (0ms, 528KB)
#08: Accepted (0ms, 452KB)
#09: Accepted (0ms, 584KB)
#10: Accepted (0ms, 1084KB)

Accepted / 100 / 0ms / 1212KB

2011年11月13日 星期日

USACO 2011 November Contest, Bronze Division Problem 3. Moo Sick (moosick)

Problem 3: Moo Sick [Rob Seay]

Everyone knows that cows love to listen to all forms of music. Almost all forms, that is -- the great cow composer Wolfgang Amadeus Moozart once discovered that a specific chord tends to make cows rather ill. This chord, known as the ruminant seventh chord, is therefore typically avoided in all cow musical compositions. 

Farmer John, not knowing the finer points of cow musical history, decides to play his favorite song over the loudspeakers in the barn. Your task is to identify all the ruminant seventh chords in this song, to estimate how sick it will make the cows. 

The song played by FJ is a series of N (1 <= N <= 20,000) notes, each an integer in the range 1..88. A ruminant seventh chord is specified by a sequence of C (1 <= C <= 10) distinct notes, also integers in the range 1..88. However, even if these notes are transposed (increased or decreased by a common amount), or re-ordered, the chord remains a ruminant seventh chord! For example, if "4 6 7" is a ruminant seventh chord, then "3 5 6" (transposed by -1), "6 8 9" (transposed by +2), "6 4 7" (re-ordered), and "5 3 6" (transposed and re-ordered) are also ruminant seventh chords.

A ruminant seventh chord is a sequence of C consecutive notes satisfying the above criteria. It is therefore uniquely determined by its starting location in the song. Please determine the indices of the starting locations of all of the ruminant seventh chords. 

PROBLEM NAME: moosick

INPUT FORMAT: 
* Line 1: A single integer: N.
* Lines 2..1+N: The N notes in FJ's song, one note per line. 
* Line 2+N: A single integer: C.
* Lines 3+N..2+N+C: The C notes in an example of a ruminant seventh chord. All transpositions and/or re-orderings of these notes are also ruminant seventh chords.

SAMPLE INPUT (file moosick.in): 






10 
3


7

INPUT DETAILS: 
FJ's song is 1,8,5,7,9,10. A ruminant seventh chord is some transposition/re-ordering of 4,6,7. OUTPUT FORMAT:
* Line 1: A count, K, of the number of ruminant seventh chords that appear in FJ's song. Observe that different instances of ruminant seventh chords can overlap each-other.
* Lines 2..1+K: Each line specifies the starting index of a ruminant seventh chord (index 1 is the first note in FJ's song, index N is the last). Indices should be listed in increasing sorted order. 

SAMPLE OUTPUT (file moosick.out): 




OUTPUT DETAILS: Two ruminant seventh chords appear in FJ's song (and these occurrences actually overlap by one note). The first is 8,5,7 (transposed by +1 and reordered) starting at index 2, and the second is 7,9,10 (transposed by +3) starting at index 4.

【分析】
還是模擬題,先對那C個ruminant seventh chords進行排序,然後一次次的快速排序,判斷即可。

【我的代碼(成績出來了,滿分)】
/*
ID:zyfwork1
PROB:moosick
LANG:C++
*/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
int N,C;
int Num[20001];
int Sev[11];
int res[20001];
int top=0;

int cmp(const void  *a,const void  *b)
{
    return *((int *)a)-*((int *)b);
}

void init()
{
    scanf("%d",&N);
    for (int i=1;i<=N;i++)
        scanf("%d\n",&Num[i]);
    scanf("%d",&C);
    for (int i=1;i<=C;i++)
        scanf("%d\n",&Sev[i]);
    qsort(Sev+1,C,sizeof(Sev[0]),cmp);
    return;
}

void work()
{
    for (int i=1;i<=N-C+1;i++)
    {
        int tmp[11];
        memset(tmp,0,sizeof(tmp));
        int tt=1;
        for (int j=i;tt<=C;j++)
            tmp[tt++]=Num[j];
        qsort(tmp+1,C,sizeof(tmp[0]),cmp);
        int delta=tmp[1]-Sev[1];
       
        bool flag=true;
        for(int k=2;k<=C;k++)
        {
            if(tmp[k]-delta!=Sev[k])
            {
                flag=false;
                break;
            }
        }
        if(flag)
        {
            res[++top]=i;
        }
    }
   
    printf("%d\n",top);
    for (int i=1;i<=top;i++)
        printf("%d\n",res[i]);
   
}

int main()
{
    freopen("moosick.in","r",stdin);
    freopen("moosick.out","w",stdout);
    init();
    work();
    return 0;
}

2011年10月29日 星期六

[基本練習]USACO Jan08 奶牛的選舉 elect

題目描述
在推翻了Farmer John這個殘暴的統治者後,奶牛們舉行了她們的第一次總統大選,貝茜也是N(1 <= N <= 50,000)頭候選奶牛之一。不過,作爲一頭有遠見的奶牛,貝茜想在選舉開始前就計算出,哪頭奶牛最有可能在競爭中勝出。
選舉分兩輪進行。第一輪中,得票最多的K(1 <= K <= N)頭奶牛晉級到下一輪,在第二輪選舉中得票最多的奶牛成爲最終的總統。
現在,貝茜告訴了你奶牛i在第一輪投票中的期望得票數A_i(1 <= A_i <= 1,000,000,000)以及她在第二輪投票中的期望得票數B_i(1 <= B_i <= 1,000,000,000)(如果奶牛i能成功晉級的話),她希望你幫她計算一下,如果這些數據無誤,那麼哪頭奶牛將成爲總統。任何數值都不會在A_i 列表中出現兩次,在B_i列表中也是如此。
程序名: elect

輸入格式:
第1行: 2個用空格隔開的整數:N 和 K
第2..N+1行: 第i+1爲2個用空格隔開的整數:A_i 和 B_i
輸入樣例 (elect.in):
5 3
3 10
9 2
5 6
8 4
6 5
輸入說明:
一共有5頭奶牛參加選舉,在第一輪中得票最多的3頭奶牛可以晉級至第二輪。奶牛們在第一輪中的得票期望分別爲3,9,5,8,6,第二輪中,分別爲10,2,6,4,5。

輸出格式:
第1行: 輸出1個整數,爲將被選爲總統的奶牛的編號
輸出樣例 (elect.out):
5
輸出說明:
奶牛2,4,5晉級到第二輪。奶牛5在第二輪投票中得到了最多的5票,贏得了選舉的最終勝利。

【分析】
通過分析發現,這就是一個簡單的排序問題,通過兩次快速排序即可解決問題。
可以用一個結構來儲存某一奶牛的編號第一輪得票數第二輪得票數先對第一輪得票數調用快速排序函數,再對第二輪得票數調用快速排序函數,最後輸出排在數組第一位的奶牛的編號即可。

【代碼】
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
typedef unsigned int usint;

class COW
{
public:
    usint Fir;
    usint Sec;
    usint num;
}C[50001];

int N,K;

int cmp(const void *a,const void *b)
{
    class COW *c=(class COW *)a;
    class COW *d=(class COW *)b;
    return d->Fir-c->Fir;
}

int Cmp(const void *a,const void *b)
{
    class COW *c=(class COW *)a;
    class COW *d=(class COW *)b;
    return d->Sec-c->Sec;
}

void init()
{
    scanf("%d %d\n",&N,&K);
    for (int i=1;i<=N;i++)
    {
        C[i].num=i;
        scanf("%d %d\n",&C[i].Fir,&C[i].Sec);
    }
    qsort(C+1,N,sizeof(C[0]),cmp);
    qsort(C+1,K,sizeof(C[0]),Cmp);
    return;
}

void print()
{
    for (int i=1;i<=N;i++)
        printf("%d %d %d\n",C[i].num,C[i].Fir,C[i].Sec);
}

int main()
{
    freopen("elect.in","r",stdin);
    freopen("elect.out","w",stdout);
    init();
    //print();
    cout<<C[1].num<<endl;
    return 0;
}

2011年10月28日 星期五

USACO Nov09 Silver : The Grand Farm-off 盛大的Farmoff 解題報告

【英文原題】
Problem 7: The Grand Farm-off [Haitao Mao, 2009]

Farmer John owns 3*N (1 <= N <= 500,000) cows surprisingly numbered
0..3*N-1, each of which has some associated integer weight W_i (1 <=
W_i <= d). He is entering the Grand Farm-off, a farming competition
where he shows off his cows to the greater agricultural community.

This competition allows him to enter a group of N cows. He has given
each of his cows a utility rating U_i (1 <= U_i <= h), which
represents the usefulness he thinks that a particular cow will have
in the competition, and he wants his selection of cows to have the
maximal sum of utility.

There might be multiple sets of N cows that attain the maximum
utility sum. FJ is afraid the competition may impose a total weight
limit on the cows in the competition, so a secondary priority is
to bring lighter weight competition cows.

Help FJ find a set of N cows with minimum possible total weight
among the sets of N cows that maximize the utility, and print the
remainder when this total weight is divided by M (10,000,000 <= M
<= 1,000,000,000).

Note: to make the input phase faster, FJ has derived polynomials
which will generate the weights and utility values for each cow.
For each cow 0 <= i < 3*N,

       W_i = (a*i^5+b*i^2+c) mod d
 and   U_i = (e*i^5+f*i^3+g) mod h

with reasonable ranges for the coefficients (0 <= a <= 1,000,000,000;
0 <= b <= 1,000,000,000; 0 <= c <= 1,000,000,000; 0 <= e <=
1,000,000,000; 0 <= f <= 1,000,000,000; 0 <= g <= 1,000,000,000;
10,000,000 <= d <= 1,000,000,000; 10,000,000 <= h <= 1,000,000,000).

The formulae do sometimes generate duplicate numbers; your algorithm
should handle this properly.

PROBLEM NAME: farmoff

INPUT FORMAT:

* Line 1: Ten space-separated integers: N, a, b, c, d, e, f, g, h, and
        M

SAMPLE INPUT (file farmoff.in):

2 0 1 5 55555555 0 1 0 55555555 55555555

INPUT DETAILS:

The functions generate weights of 5, 6, 9, 14, 21, and 30 along
with utilities of 0, 1, 8, 27, 64, and 125.

OUTPUT FORMAT:

* Line 1: A single integer representing the lowest sum of the weights
        of the N cows with the highest net utility.

SAMPLE OUTPUT (file farmoff.out):

51

OUTPUT DETAILS:

The two cows with the highest utility are cow 5 and 6, and their combined
weight is 21+30=51.

【中文翻譯】
問題描述:
農夫約翰擁有 3*N(1 <= N <= 500,000)只牛,它們的編號爲0..3*N-1,每隻牛都有一個體重 W_i(1 <= W_i <= d)。約翰參加了一個叫做 Farm-off 的盛大競賽活動,在這個活動上他可以在整個農業界炫耀他的牛。
這個競賽約翰可以派出一隊共 N 頭牛參賽,他的每頭牛都有一個效率值 U_i (1 <= U_i <= h),這個值用來描述他認爲在這個競賽中每頭牛的有用值。約翰想讓他選擇的一羣牛有一個最大的效率總值。
可能有很多種 N 頭牛的集合可以達到這個最大的效率總值。農夫約翰爲了防止競賽中的欺騙行爲,對牛的體重加以限制。所以第二個要考慮的因素便是參加競賽的牛的體重。
幫助約翰從所有以N頭牛組合而得的效率總值最大的集閤中,找到一個最小體重的組合。 並且打印出體重總值被M (10,000,000 <= M <= 1,000,000,000)整除後的餘數。
注意:爲了儘快地輸入,約翰找到一個能夠表示出每頭牛體重及效率值的多項式:
對於每頭牛 0 <= i < 3*N,
W_i = (a*i^5+b*i^2+c) mod d
U_i = (e*i^5+f*i^3+g) mod h 

合理的係數範圍:
0 <= a <= 1,000,000,000;
0 <= b <= 1,000,000,000;
0 <= c <= 1,000,000,000;
0 <= e <= 1,000,000,000;
0 <= f <= 1,000,000,000;
0 <= g <= 1,000,000,000;
10,000,000 <= d <= 1,000,000,000;
10,000,000 <= h <= 1,000,000,000.
公式有時會產生一些重複的數字,你的算法應該能夠適應這種情況。
PROBLEM NAME: farmoff

輸入格式:
第一行:用空格隔開的10個數字:N, a, b, c, d, e, f, g, h,M

輸入樣例:(file farmoff.in):
2 0 1 5 55555555 0 1 0 55555555 55555555
根據公式計算出來的 W_i 分別是:5, 6, 9, 14, 21,30;計算出來的U_i分別是:0, 1, 8, 27, 64,125

輸出格式:
第一行:一個單獨的整數用來描述:N頭牛的淨效率總值最大的條件下的最小體重總值。

輸出樣例(farmoff.out):
51
兩隻牛的組閤中效率最大的是牛5和牛6,它們的體重總值爲:21+30=51

【分析】
本題並不是很難,因為沒有用到很難的算法。
因為數據很大,當然可以用高精度算法來實現。
但是高精度算法不僅代碼複雜度高,而且時間複雜度也不低。
所以,我們可以通過餘數定理來實現把大數據變小,變到long long的範圍(2^63-1)之內。
 =======================================
[餘數定理]

a:兩數的和除以m的餘數等於這兩個數分別除以m的餘數和。
實例:7÷3=…1,5÷3=…2,這樣(7+5)÷3的餘數就等於1+2=3,所以餘0。
b: 兩數的差除以m的餘數等於這兩個數分別除以m的餘數差。
實例:8÷3=…2,4÷3=…1,這樣(8-4)÷3的餘數就等於2-1=1,所以餘1。
如果是(7-5)÷3呢? 會出什麼問題?
c: 兩數的積除以m的餘數等於這兩個數分別除以m的餘數積。
實例:7÷3=…1,5÷3=…2,這樣(7×5)÷3的餘數就等於1×2=2,所以餘2。
attention:
對a,餘數和應再對m取次餘
對b,餘數差應加上m後再對m取次餘
 ========================================
然後 ,本題剩下的部分就是利用編程語言中的快速排序(qsort),對結構體進行二級排序即可。

【我的代碼】
(在記憶體為512MB,CPU為1.6GHz的評測機上,10組測試數據共運行4.813秒。)
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int N;
long long a,b,c,D,e,f,g,H;
long long M;
long long S=0;
long long tt;

class COW
{
public:
    long long W;
    long long U;
}C[1500001];

int cmp(const void *a,const void *b)
{
    class COW *c=(class COW *)a;
    class COW *d=(class COW *)b;
    if(c->U!=d->U)
        return d->U-c->U;
    return c->W-d->W;
}

long long pl(long long num,long long level,long long moder)
{
    long long temp=1;
    while (level)
    {
        temp=(temp*num)%moder;
        level--;
    }
    return(temp);
}

void init()
{
    cin>>N;
    cin>>a>>b>>c>>D>>e>>f>>g>>H;
    cin>>M;
    long long w,u;
    for (int i=0;i<3*N;i++)
    {
        w=((((a%D)*pl(i,5,D))%D+((b%D)*pl(i,2,D))%D)+c%D)%D;
        u=((((e%H)*pl(i,5,H))%H+((f%H)*pl(i,3,H))%H)+g%H)%H;
        C[i].W=w;
        C[i].U=u;
    }

    qsort(C,3*N,sizeof(C[0]),cmp);
  
    for (int i=0;i<N;i++)
    {
        S+=C[i].W;
        S%=M;
    }
    cout<<S<<endl;
}

int main()
{
    freopen("farmoff.in","r",stdin);
    freopen("farmoff.out","w",stdout);
    init();
    return 0;
}

2011年10月26日 星期三

NOIP2006普及組 明明的隨機數 random 解題報告

【問題描述】
明明想在學校中請一些同學一起做一項問卷調查,爲了實驗的客觀性,他先用計算機生成了 N 個 1 到 1000 之間的隨機整數( N ≤ 100 ),對於其中重複的數字,只保留一個,把其餘相同的數去掉,不同的數對應着不同的學生的學號。然後再把這些數從小到大排序,按 照 排好的順序去找同學做調查。請你協助明明完成“去重”與“排序”的工作。

【輸入格式】
輸入文件 random.in 有 2 行,第 1 行爲 1 個正整數,表示所生成的隨機數的個數:N
第 2 行有 N 個用空格隔開的正整數,爲所產生的隨機數。

【輸出格式】
輸出文件 random.out 也是 2 行,第 1 行爲 1 個正整數 M ,表示不相同的隨機數的個數。第 2 行爲 M 個用空格隔開的正整數,爲從小到大排好序的不相同的隨機數。

【輸入輸出樣例】
輸入:
10
20 40 32 67 40 20 89 300 400 15
輸出:
8
15 20 32 40 67 89 300 400

【分析】
再水不過的題了,直接模擬,然後上快速排序。

【我的代碼】
01 //NOIP2006-Junior-Random
02 #include <cstdio>
03 #include <cstdlib>
04 #include <iostream>
05 using namespace std;
06
07 int Compare(const void *a,const void *b)
08 {
09     return *(int *)a-*(int *)b;
10 }
11
12 int main()
13 {
14     freopen("random.in","r",stdin);
15     freopen("random.out","w",stdout);
16     int num[101]={0};
17     int n;
18     scanf("%d",&n);
19     for (int i=1;i<=n;i++)
20         scanf("%d",&num[i]);
21     int reduce=0;
22     for (int i=1;i<=n;i++)
23         for (int j=i+1;j<=n;j++)
24             if (num[j]!=1001 && num[i]!=1001 && num[j]==num[i])
25                 {
26                     num[j]=1001;
27                     reduce++;
28                 }
29     qsort(num+1,n,sizeof(int),Compare);
30     cout<<n-reduce<<endl;
31     for(int i=1;i<=n-reduce;i++)
32         cout<<num[i]<<" ";
33     cout<<endl;
34     return 0;
35 }
正在连接评测机...

已连接到评测机
GRID 1
名称 Flitty
系统版本 1.00
备注 COGS 1号评测机 Flitty
正在编译...
编译成功

测试点 结果 得分 运行时间 内存使用 退出代码
1 正确 10 0.018 s 273 KB 0
2 正确 10 0.001 s 273 KB 0
3 正确 10 0.001 s 273 KB 0
4 正确 10 0.001 s 273 KB 0
5 正确 10 0.001 s 273 KB 0
6 正确 10 0.001 s 273 KB 0
7 正确 10 0.001 s 273 KB 0
8 正确 10 0.001 s 273 KB 0
9 正确 10 0.001 s 273 KB 0
10 正确 10 0.001 s 273 KB 0
运行完成
运行时间 0.024 s
平均内存使用 273 KB
测试点通过状况 AAAAAAAAAA
得分:100
恭喜你通过了全部测试点!

2011年10月25日 星期二

NOIP2007普及組 scholar 獎學金 解題報告

【問題描述】
某小學最近得到了一筆贊助,打算拿出其中一部分爲學習成績優秀的前5名學生發獎學金。期末,每個學生都有3門課的成績:語文、數學、英語。先按總分從高到 低排序,如果兩個同學總分相同,再按語文成績從高到低排序,如果兩個同學總分和語文成績都相同,那麼規定學號小的同學排在前面,這樣,每個學生的排序是唯 一確定的。
任務:先根據輸入的3門課的成績計算總分,然後按上述規則排序,最後按排名順序輸出前5名學生的學號和總分。注意,在前5名同學中,每個人的獎學金都不相 同,因此,你必須嚴格按上述規則排序。例如,在某個正確答案中,如果前兩行的輸出數據(每行輸出兩個數:學號、總分)是:
7 279
5 279
這兩行數據的含義是:總分最高的兩個同學的學號依次是7號、5號。這兩名同學的總分都是279(總分等於輸入的語文、數學、英語三科成績之和),但學號爲7的學生語文成績更高一些。如果你的前兩名的輸出數據是:
5 279
7 279
則按輸出錯誤處理,不能得分。

【輸入】
輸入文件pj07-1.in 包含行n+1行:
第l行爲一個正整數n,表示該校參加評選的學生人數。
第2到年n+l行,每行有3個用空格隔開的數字,每個數字都在0到100之間。第j行的3個數字依次表示學號爲j-1的學生的語文、數學、英語的成績。每個學生的學號按照輸入順序編號爲1~n(恰好是輸入數據的行號減1)。
所給的數據都是正確的,不必檢驗。

【輸出】
輸出文件pj07-1.out 共有5行,每行是兩個用空格隔開的正整數,依次表示前5名學生的學號和總分。

【輸入輸出樣例l】
pj07-1.in
6
90 67 80
87 66 91
78 89 91
88 99 77
67 89 64
78 89 98
pj07-1.out
6 265
4 264
3 258
2 244
1 237

【輸入輸出樣例2】
pj07-1.in
8
80 89 89
88 98 78
90 67 80
87 66 91
78 89 91
88 99 77
67 89 64
78 89 98
pj07-1.out
8 265
2 264
6 264
1 258
5 258

【限制】
50%的數據滿足:各學生的總成績各不相同
100%的數據滿足:6<=n<=300

【分析】
模擬題目,直接調用C++中的快速排序,使用結構體(或 類)的三級排序即可。
注意qsort中cmp函數 的寫法。
【我的代碼】
//NOIP2007-Senior-Scholar
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
typedef unsigned short int usint;
const int maxn=301;

class Student
//struct Student
{
public:
    usint total;
    usint chs;
    usint mth;
    usint eng;
    usint num;
}Grade[maxn];
int n;

void init()
{
    scanf("%d",&n);
    for (int i=1;i<=n;i++)
    {
        //Grade[i].num=i;
        scanf("%d%d%d",&Grade[i].chs,&Grade[i].mth,&Grade[i].eng);
        Grade[i].total=Grade[i].chs+Grade[i].mth+Grade[i].eng;
        Grade[i].num=i;
    }
    return;
}
void print()
{
    for (int i=1;i<=n;i++)
        cout<<Grade[i].num<<" "<<Grade[i].total<<" "<<Grade[i].chs<<" "<<Grade[i].mth<<" "<<Grade[i].eng<<endl;
}

void printresult()
{
    for (int i=1;i<=5;i++)
        cout<<Grade[i].num<<" "<<Grade[i].total<<endl;
}

int Compare(const void *a,const void *b)
{
    class Student *c=(class Student *)a;
    class Student *d=(class Student *)b;
    if (c->total != d->total)
        return  d->total - c->total;
    else
    {
        if (d->chs != c->chs)
            return  d->chs - c->chs;
        else return c->num - d->num;
    }
}

int main()
{
    freopen("pj07-1.in","r",stdin);
    freopen("pj07-1.out","w",stdout);
    init();
    qsort(Grade+1,n,sizeof(Student),Compare);
    printresult();
    return 0;
}

正在连接评测机...

已连接到评测机
GRID 1
名称 Flitty
系统版本 1.00
备注 COGS 1号评测机 Flitty
正在编译...
编译成功

测试点 结果 得分 运行时间 内存使用 退出代码
1 正确 10 0.000 s 277 KB 0
2 正确 10 0.000 s 277 KB 0
3 正确 10 0.000 s 277 KB 0
4 正确 10 0.000 s 277 KB 0
5 正确 10 0.001 s 277 KB 0
6 正确 10 0.001 s 277 KB 0
7 正确 10 0.001 s 277 KB 0
8 正确 10 0.001 s 277 KB 0
9 正确 10 0.001 s 277 KB 0
10 正确 10 0.000 s 277 KB 0
运行完成
运行时间 0.005 s
平均内存使用 277 KB
测试点通过状况 AAAAAAAAAA
得分:100
恭喜你通过了全部测试点!