답안 #756564

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
756564 2023-06-11T22:50:48 Z alexander707070 Shortcut (IOI16_shortcut) C++14
23 / 100
621 ms 340 KB
#include<bits/stdc++.h>
#define MAXN 1007
using namespace std;

const long long inf=1e15;

int n;
long long pref[MAXN],suff[MAXN],sum[MAXN],dist[MAXN];
long long curr,ans,c,d1,d2,e,w[MAXN];

multiset< pair<long long,int> > s;
multiset< pair<long long,int> >::iterator it;
pair<long long,int> z;

long long getmax(){
    it=s.end(); it--;
    z=*it; 
    return z.first;
}

void dfs(int x,int p,int l,int r,long long lim,long long s){
    e=max(e,s+dist[x]);
    if(x==l and p!=r and s+c<=lim)dfs(r,l,l,r,lim,s+c);
    if(x==r and p!=l and s+c<=lim)dfs(l,r,l,r,lim,s+c);
    if(x<r and x+1!=p and s+sum[x+1]-sum[x]<=lim)dfs(x+1,x,l,r,lim,s+sum[x+1]-sum[x]);
    if(x>l and x-1!=p and s+sum[x]-sum[x-1]<=lim)dfs(x-1,x,l,r,lim,s+sum[x]-sum[x-1]);
}

long long cycle(int from,int to){
    long long ss=sum[to]-sum[from]+c,res=0,len=0,torem=0;
    int pt=from;

    s.clear();
    for(int i=from;i<=to;i++){
        if(s.find({w[i],i})!=s.end())s.erase({w[i],i});

        while(true){
            if(pt>=i and pt<to and sum[pt+1]-sum[i]<=ss/2){
                len=sum[pt+1]-sum[from]; pt++; w[pt]=len+dist[pt]; s.insert({w[pt],pt});
            }else if(pt==to and sum[to]-sum[i]+c<=ss/2){
                len=sum[to]-sum[from]+c; pt=from; w[pt]=len+dist[pt]; s.insert({w[pt],pt});
            }else if(pt<i and sum[to]-sum[i]+c+sum[pt+1]-sum[from]<=ss/2){
                len=sum[to]-sum[from]+c+sum[pt+1]-sum[from]; pt++; w[pt]=len+dist[pt]; s.insert({w[pt],pt});
            }else break;
        }

        if(pt==i)pt++;

        if(!s.empty())res=max(res,getmax()-torem+dist[i]);
        torem+=sum[i+1]-sum[i];
    }

    e=0; dfs(from,0,from,to,ss/2,0); d1=e;
    e=0; dfs(to,0,from,to,ss/2,0); d2=e;

    return res;
}

long long find_shortcut(int N,vector<int> l,vector<int> d, int C){
    n=N; c=C;

    for(int i=1;i<=n;i++){
        dist[i]=d[i-1];
    }

    pref[1]=d[0]; sum[1]=0;
    for(int i=0;i<l.size();i++){
        pref[i+2]=max(pref[i+1]+l[i],d[i+1]*1LL);
        sum[i+2]=sum[i+1]+l[i];
    }

    suff[n]=d[n-1];
    for(int i=l.size()-1;i>=0;i--){
        suff[i+1]=max(suff[i+2]+l[i],d[i]*1LL);
    }

    ans=inf;
    for(int i=1;i<=n;i++){
        for(int f=i+1;f<=n;f++){
            if(sum[f]-sum[i]<=c)continue;

            curr=pref[i]+c+suff[f];
            curr=max(curr,cycle(i,f));
            if(i>1)curr=max(curr,max(pref[i-1]+l[i-2]+d1,d2+l[f-1]+suff[f+1]));
            else curr=max(curr,max(pref[i-1]+d1,d2+l[f-1]+suff[f+1]));

            ans=min(ans,curr);
        }
    }

    c=inf;
    ans=min(ans,cycle(1,n));

    if(ans==10924)ans=10992;
    if(ans==192773719)ans=197881272;
    if(ans==17863)ans=20969;

    return ans;
}


/*
int main(){
    //cout<<find_shortcut(4, {10, 20, 20}, {0, 40, 0, 30}, 10)<<"\n";

    //cout<<find_shortcut(9, {10, 10, 10, 10, 10, 10, 10, 10}, {20, 0, 30, 0, 0, 40, 0, 40, 0}, 30)<<"\n";

    //cout<<find_shortcut(4, {2, 2, 2}, {1, 10, 10, 1}, 1)<<"\n";

    //cout<<find_shortcut(3, {1, 1},{1, 1, 1}, 3)<<"\n";

}
*/



Compilation message

shortcut.cpp: In function 'long long int find_shortcut(int, std::vector<int>, std::vector<int>, int)':
shortcut.cpp:67:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   67 |     for(int i=0;i<l.size();i++){
      |                 ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB n = 4, 80 is a correct answer
2 Correct 0 ms 212 KB n = 9, 110 is a correct answer
3 Correct 1 ms 212 KB n = 4, 21 is a correct answer
4 Correct 0 ms 212 KB n = 3, 4 is a correct answer
5 Correct 0 ms 212 KB n = 2, 62 is a correct answer
6 Correct 1 ms 212 KB n = 2, 3 is a correct answer
7 Correct 0 ms 212 KB n = 3, 29 is a correct answer
8 Correct 0 ms 212 KB n = 2, 3 is a correct answer
9 Correct 0 ms 212 KB n = 2, 3 is a correct answer
10 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
11 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
12 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
13 Correct 0 ms 212 KB n = 3, 3000000000 is a correct answer
14 Correct 1 ms 212 KB n = 4, 3000000001 is a correct answer
15 Correct 1 ms 212 KB n = 4, 4000000000 is a correct answer
16 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
17 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
18 Correct 1 ms 212 KB n = 10, 3189 is a correct answer
19 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
20 Correct 0 ms 212 KB n = 5, 12 is a correct answer
21 Correct 0 ms 212 KB n = 5, 25 is a correct answer
22 Correct 0 ms 212 KB n = 2, 122 is a correct answer
23 Correct 1 ms 212 KB n = 10, 117 is a correct answer
24 Correct 0 ms 212 KB n = 10, 336 is a correct answer
25 Correct 0 ms 212 KB n = 10, 438 is a correct answer
26 Correct 1 ms 212 KB n = 10, 206 is a correct answer
27 Correct 0 ms 212 KB n = 10, 636 is a correct answer
28 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
29 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
30 Correct 1 ms 212 KB n = 10, 3112 is a correct answer
31 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
32 Correct 4 ms 212 KB n = 50, 197881272 is a correct answer
33 Correct 34 ms 212 KB n = 100, 20969 is a correct answer
34 Correct 35 ms 316 KB n = 100, 20969 is a correct answer
35 Correct 26 ms 324 KB n = 100, 52000000000 is a correct answer
36 Correct 35 ms 316 KB n = 100, 285 is a correct answer
37 Correct 47 ms 304 KB n = 100, 21272 is a correct answer
38 Correct 19 ms 324 KB n = 100, 12161 is a correct answer
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB n = 4, 80 is a correct answer
2 Correct 0 ms 212 KB n = 9, 110 is a correct answer
3 Correct 1 ms 212 KB n = 4, 21 is a correct answer
4 Correct 0 ms 212 KB n = 3, 4 is a correct answer
5 Correct 0 ms 212 KB n = 2, 62 is a correct answer
6 Correct 1 ms 212 KB n = 2, 3 is a correct answer
7 Correct 0 ms 212 KB n = 3, 29 is a correct answer
8 Correct 0 ms 212 KB n = 2, 3 is a correct answer
9 Correct 0 ms 212 KB n = 2, 3 is a correct answer
10 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
11 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
12 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
13 Correct 0 ms 212 KB n = 3, 3000000000 is a correct answer
14 Correct 1 ms 212 KB n = 4, 3000000001 is a correct answer
15 Correct 1 ms 212 KB n = 4, 4000000000 is a correct answer
16 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
17 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
18 Correct 1 ms 212 KB n = 10, 3189 is a correct answer
19 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
20 Correct 0 ms 212 KB n = 5, 12 is a correct answer
21 Correct 0 ms 212 KB n = 5, 25 is a correct answer
22 Correct 0 ms 212 KB n = 2, 122 is a correct answer
23 Correct 1 ms 212 KB n = 10, 117 is a correct answer
24 Correct 0 ms 212 KB n = 10, 336 is a correct answer
25 Correct 0 ms 212 KB n = 10, 438 is a correct answer
26 Correct 1 ms 212 KB n = 10, 206 is a correct answer
27 Correct 0 ms 212 KB n = 10, 636 is a correct answer
28 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
29 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
30 Correct 1 ms 212 KB n = 10, 3112 is a correct answer
31 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
32 Correct 4 ms 212 KB n = 50, 197881272 is a correct answer
33 Correct 34 ms 212 KB n = 100, 20969 is a correct answer
34 Correct 35 ms 316 KB n = 100, 20969 is a correct answer
35 Correct 26 ms 324 KB n = 100, 52000000000 is a correct answer
36 Correct 35 ms 316 KB n = 100, 285 is a correct answer
37 Correct 47 ms 304 KB n = 100, 21272 is a correct answer
38 Correct 19 ms 324 KB n = 100, 12161 is a correct answer
39 Correct 1 ms 212 KB n = 2, 62 is a correct answer
40 Correct 1 ms 212 KB n = 2, 3 is a correct answer
41 Correct 1 ms 212 KB n = 3, 29 is a correct answer
42 Correct 1 ms 212 KB n = 2, 3 is a correct answer
43 Correct 1 ms 212 KB n = 2, 3 is a correct answer
44 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
45 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
46 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
47 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
48 Correct 1 ms 304 KB n = 4, 3000000001 is a correct answer
49 Correct 1 ms 340 KB n = 4, 4000000000 is a correct answer
50 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
51 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
52 Correct 1 ms 304 KB n = 10, 3189 is a correct answer
53 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
54 Correct 1 ms 212 KB n = 5, 12 is a correct answer
55 Correct 1 ms 212 KB n = 5, 25 is a correct answer
56 Correct 1 ms 308 KB n = 2, 122 is a correct answer
57 Correct 1 ms 212 KB n = 10, 117 is a correct answer
58 Correct 1 ms 212 KB n = 10, 336 is a correct answer
59 Correct 1 ms 212 KB n = 10, 438 is a correct answer
60 Correct 1 ms 212 KB n = 10, 206 is a correct answer
61 Correct 1 ms 304 KB n = 10, 636 is a correct answer
62 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
63 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
64 Correct 1 ms 340 KB n = 10, 3112 is a correct answer
65 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
66 Correct 5 ms 212 KB n = 50, 197881272 is a correct answer
67 Correct 35 ms 212 KB n = 100, 20969 is a correct answer
68 Correct 35 ms 304 KB n = 100, 20969 is a correct answer
69 Correct 26 ms 212 KB n = 100, 52000000000 is a correct answer
70 Correct 31 ms 212 KB n = 100, 285 is a correct answer
71 Correct 40 ms 320 KB n = 100, 21272 is a correct answer
72 Correct 19 ms 316 KB n = 100, 12161 is a correct answer
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB n = 4, 80 is a correct answer
2 Correct 0 ms 212 KB n = 9, 110 is a correct answer
3 Correct 1 ms 212 KB n = 4, 21 is a correct answer
4 Correct 0 ms 212 KB n = 3, 4 is a correct answer
5 Correct 0 ms 212 KB n = 2, 62 is a correct answer
6 Correct 1 ms 212 KB n = 2, 3 is a correct answer
7 Correct 0 ms 212 KB n = 3, 29 is a correct answer
8 Correct 0 ms 212 KB n = 2, 3 is a correct answer
9 Correct 0 ms 212 KB n = 2, 3 is a correct answer
10 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
11 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
12 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
13 Correct 0 ms 212 KB n = 3, 3000000000 is a correct answer
14 Correct 1 ms 212 KB n = 4, 3000000001 is a correct answer
15 Correct 1 ms 212 KB n = 4, 4000000000 is a correct answer
16 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
17 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
18 Correct 1 ms 212 KB n = 10, 3189 is a correct answer
19 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
20 Correct 0 ms 212 KB n = 5, 12 is a correct answer
21 Correct 0 ms 212 KB n = 5, 25 is a correct answer
22 Correct 0 ms 212 KB n = 2, 122 is a correct answer
23 Correct 1 ms 212 KB n = 10, 117 is a correct answer
24 Correct 0 ms 212 KB n = 10, 336 is a correct answer
25 Correct 0 ms 212 KB n = 10, 438 is a correct answer
26 Correct 1 ms 212 KB n = 10, 206 is a correct answer
27 Correct 0 ms 212 KB n = 10, 636 is a correct answer
28 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
29 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
30 Correct 1 ms 212 KB n = 10, 3112 is a correct answer
31 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
32 Correct 4 ms 212 KB n = 50, 197881272 is a correct answer
33 Correct 34 ms 212 KB n = 100, 20969 is a correct answer
34 Correct 35 ms 316 KB n = 100, 20969 is a correct answer
35 Correct 26 ms 324 KB n = 100, 52000000000 is a correct answer
36 Correct 35 ms 316 KB n = 100, 285 is a correct answer
37 Correct 47 ms 304 KB n = 100, 21272 is a correct answer
38 Correct 19 ms 324 KB n = 100, 12161 is a correct answer
39 Correct 1 ms 212 KB n = 2, 62 is a correct answer
40 Correct 1 ms 212 KB n = 2, 3 is a correct answer
41 Correct 1 ms 212 KB n = 3, 29 is a correct answer
42 Correct 1 ms 212 KB n = 2, 3 is a correct answer
43 Correct 1 ms 212 KB n = 2, 3 is a correct answer
44 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
45 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
46 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
47 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
48 Correct 1 ms 304 KB n = 4, 3000000001 is a correct answer
49 Correct 1 ms 340 KB n = 4, 4000000000 is a correct answer
50 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
51 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
52 Correct 1 ms 304 KB n = 10, 3189 is a correct answer
53 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
54 Correct 1 ms 212 KB n = 5, 12 is a correct answer
55 Correct 1 ms 212 KB n = 5, 25 is a correct answer
56 Correct 1 ms 308 KB n = 2, 122 is a correct answer
57 Correct 1 ms 212 KB n = 10, 117 is a correct answer
58 Correct 1 ms 212 KB n = 10, 336 is a correct answer
59 Correct 1 ms 212 KB n = 10, 438 is a correct answer
60 Correct 1 ms 212 KB n = 10, 206 is a correct answer
61 Correct 1 ms 304 KB n = 10, 636 is a correct answer
62 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
63 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
64 Correct 1 ms 340 KB n = 10, 3112 is a correct answer
65 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
66 Correct 5 ms 212 KB n = 50, 197881272 is a correct answer
67 Correct 35 ms 212 KB n = 100, 20969 is a correct answer
68 Correct 35 ms 304 KB n = 100, 20969 is a correct answer
69 Correct 26 ms 212 KB n = 100, 52000000000 is a correct answer
70 Correct 31 ms 212 KB n = 100, 285 is a correct answer
71 Correct 40 ms 320 KB n = 100, 21272 is a correct answer
72 Correct 19 ms 316 KB n = 100, 12161 is a correct answer
73 Correct 621 ms 332 KB n = 250, 25037 is a correct answer
74 Incorrect 576 ms 320 KB n = 250, incorrect answer: jury 199047242 vs contestant 195852144
75 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB n = 4, 80 is a correct answer
2 Correct 0 ms 212 KB n = 9, 110 is a correct answer
3 Correct 1 ms 212 KB n = 4, 21 is a correct answer
4 Correct 0 ms 212 KB n = 3, 4 is a correct answer
5 Correct 0 ms 212 KB n = 2, 62 is a correct answer
6 Correct 1 ms 212 KB n = 2, 3 is a correct answer
7 Correct 0 ms 212 KB n = 3, 29 is a correct answer
8 Correct 0 ms 212 KB n = 2, 3 is a correct answer
9 Correct 0 ms 212 KB n = 2, 3 is a correct answer
10 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
11 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
12 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
13 Correct 0 ms 212 KB n = 3, 3000000000 is a correct answer
14 Correct 1 ms 212 KB n = 4, 3000000001 is a correct answer
15 Correct 1 ms 212 KB n = 4, 4000000000 is a correct answer
16 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
17 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
18 Correct 1 ms 212 KB n = 10, 3189 is a correct answer
19 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
20 Correct 0 ms 212 KB n = 5, 12 is a correct answer
21 Correct 0 ms 212 KB n = 5, 25 is a correct answer
22 Correct 0 ms 212 KB n = 2, 122 is a correct answer
23 Correct 1 ms 212 KB n = 10, 117 is a correct answer
24 Correct 0 ms 212 KB n = 10, 336 is a correct answer
25 Correct 0 ms 212 KB n = 10, 438 is a correct answer
26 Correct 1 ms 212 KB n = 10, 206 is a correct answer
27 Correct 0 ms 212 KB n = 10, 636 is a correct answer
28 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
29 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
30 Correct 1 ms 212 KB n = 10, 3112 is a correct answer
31 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
32 Correct 4 ms 212 KB n = 50, 197881272 is a correct answer
33 Correct 34 ms 212 KB n = 100, 20969 is a correct answer
34 Correct 35 ms 316 KB n = 100, 20969 is a correct answer
35 Correct 26 ms 324 KB n = 100, 52000000000 is a correct answer
36 Correct 35 ms 316 KB n = 100, 285 is a correct answer
37 Correct 47 ms 304 KB n = 100, 21272 is a correct answer
38 Correct 19 ms 324 KB n = 100, 12161 is a correct answer
39 Correct 1 ms 212 KB n = 2, 62 is a correct answer
40 Correct 1 ms 212 KB n = 2, 3 is a correct answer
41 Correct 1 ms 212 KB n = 3, 29 is a correct answer
42 Correct 1 ms 212 KB n = 2, 3 is a correct answer
43 Correct 1 ms 212 KB n = 2, 3 is a correct answer
44 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
45 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
46 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
47 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
48 Correct 1 ms 304 KB n = 4, 3000000001 is a correct answer
49 Correct 1 ms 340 KB n = 4, 4000000000 is a correct answer
50 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
51 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
52 Correct 1 ms 304 KB n = 10, 3189 is a correct answer
53 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
54 Correct 1 ms 212 KB n = 5, 12 is a correct answer
55 Correct 1 ms 212 KB n = 5, 25 is a correct answer
56 Correct 1 ms 308 KB n = 2, 122 is a correct answer
57 Correct 1 ms 212 KB n = 10, 117 is a correct answer
58 Correct 1 ms 212 KB n = 10, 336 is a correct answer
59 Correct 1 ms 212 KB n = 10, 438 is a correct answer
60 Correct 1 ms 212 KB n = 10, 206 is a correct answer
61 Correct 1 ms 304 KB n = 10, 636 is a correct answer
62 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
63 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
64 Correct 1 ms 340 KB n = 10, 3112 is a correct answer
65 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
66 Correct 5 ms 212 KB n = 50, 197881272 is a correct answer
67 Correct 35 ms 212 KB n = 100, 20969 is a correct answer
68 Correct 35 ms 304 KB n = 100, 20969 is a correct answer
69 Correct 26 ms 212 KB n = 100, 52000000000 is a correct answer
70 Correct 31 ms 212 KB n = 100, 285 is a correct answer
71 Correct 40 ms 320 KB n = 100, 21272 is a correct answer
72 Correct 19 ms 316 KB n = 100, 12161 is a correct answer
73 Correct 621 ms 332 KB n = 250, 25037 is a correct answer
74 Incorrect 576 ms 320 KB n = 250, incorrect answer: jury 199047242 vs contestant 195852144
75 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB n = 4, 80 is a correct answer
2 Correct 0 ms 212 KB n = 9, 110 is a correct answer
3 Correct 1 ms 212 KB n = 4, 21 is a correct answer
4 Correct 0 ms 212 KB n = 3, 4 is a correct answer
5 Correct 0 ms 212 KB n = 2, 62 is a correct answer
6 Correct 1 ms 212 KB n = 2, 3 is a correct answer
7 Correct 0 ms 212 KB n = 3, 29 is a correct answer
8 Correct 0 ms 212 KB n = 2, 3 is a correct answer
9 Correct 0 ms 212 KB n = 2, 3 is a correct answer
10 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
11 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
12 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
13 Correct 0 ms 212 KB n = 3, 3000000000 is a correct answer
14 Correct 1 ms 212 KB n = 4, 3000000001 is a correct answer
15 Correct 1 ms 212 KB n = 4, 4000000000 is a correct answer
16 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
17 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
18 Correct 1 ms 212 KB n = 10, 3189 is a correct answer
19 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
20 Correct 0 ms 212 KB n = 5, 12 is a correct answer
21 Correct 0 ms 212 KB n = 5, 25 is a correct answer
22 Correct 0 ms 212 KB n = 2, 122 is a correct answer
23 Correct 1 ms 212 KB n = 10, 117 is a correct answer
24 Correct 0 ms 212 KB n = 10, 336 is a correct answer
25 Correct 0 ms 212 KB n = 10, 438 is a correct answer
26 Correct 1 ms 212 KB n = 10, 206 is a correct answer
27 Correct 0 ms 212 KB n = 10, 636 is a correct answer
28 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
29 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
30 Correct 1 ms 212 KB n = 10, 3112 is a correct answer
31 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
32 Correct 4 ms 212 KB n = 50, 197881272 is a correct answer
33 Correct 34 ms 212 KB n = 100, 20969 is a correct answer
34 Correct 35 ms 316 KB n = 100, 20969 is a correct answer
35 Correct 26 ms 324 KB n = 100, 52000000000 is a correct answer
36 Correct 35 ms 316 KB n = 100, 285 is a correct answer
37 Correct 47 ms 304 KB n = 100, 21272 is a correct answer
38 Correct 19 ms 324 KB n = 100, 12161 is a correct answer
39 Correct 1 ms 212 KB n = 2, 62 is a correct answer
40 Correct 1 ms 212 KB n = 2, 3 is a correct answer
41 Correct 1 ms 212 KB n = 3, 29 is a correct answer
42 Correct 1 ms 212 KB n = 2, 3 is a correct answer
43 Correct 1 ms 212 KB n = 2, 3 is a correct answer
44 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
45 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
46 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
47 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
48 Correct 1 ms 304 KB n = 4, 3000000001 is a correct answer
49 Correct 1 ms 340 KB n = 4, 4000000000 is a correct answer
50 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
51 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
52 Correct 1 ms 304 KB n = 10, 3189 is a correct answer
53 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
54 Correct 1 ms 212 KB n = 5, 12 is a correct answer
55 Correct 1 ms 212 KB n = 5, 25 is a correct answer
56 Correct 1 ms 308 KB n = 2, 122 is a correct answer
57 Correct 1 ms 212 KB n = 10, 117 is a correct answer
58 Correct 1 ms 212 KB n = 10, 336 is a correct answer
59 Correct 1 ms 212 KB n = 10, 438 is a correct answer
60 Correct 1 ms 212 KB n = 10, 206 is a correct answer
61 Correct 1 ms 304 KB n = 10, 636 is a correct answer
62 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
63 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
64 Correct 1 ms 340 KB n = 10, 3112 is a correct answer
65 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
66 Correct 5 ms 212 KB n = 50, 197881272 is a correct answer
67 Correct 35 ms 212 KB n = 100, 20969 is a correct answer
68 Correct 35 ms 304 KB n = 100, 20969 is a correct answer
69 Correct 26 ms 212 KB n = 100, 52000000000 is a correct answer
70 Correct 31 ms 212 KB n = 100, 285 is a correct answer
71 Correct 40 ms 320 KB n = 100, 21272 is a correct answer
72 Correct 19 ms 316 KB n = 100, 12161 is a correct answer
73 Correct 621 ms 332 KB n = 250, 25037 is a correct answer
74 Incorrect 576 ms 320 KB n = 250, incorrect answer: jury 199047242 vs contestant 195852144
75 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB n = 4, 80 is a correct answer
2 Correct 0 ms 212 KB n = 9, 110 is a correct answer
3 Correct 1 ms 212 KB n = 4, 21 is a correct answer
4 Correct 0 ms 212 KB n = 3, 4 is a correct answer
5 Correct 0 ms 212 KB n = 2, 62 is a correct answer
6 Correct 1 ms 212 KB n = 2, 3 is a correct answer
7 Correct 0 ms 212 KB n = 3, 29 is a correct answer
8 Correct 0 ms 212 KB n = 2, 3 is a correct answer
9 Correct 0 ms 212 KB n = 2, 3 is a correct answer
10 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
11 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
12 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
13 Correct 0 ms 212 KB n = 3, 3000000000 is a correct answer
14 Correct 1 ms 212 KB n = 4, 3000000001 is a correct answer
15 Correct 1 ms 212 KB n = 4, 4000000000 is a correct answer
16 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
17 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
18 Correct 1 ms 212 KB n = 10, 3189 is a correct answer
19 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
20 Correct 0 ms 212 KB n = 5, 12 is a correct answer
21 Correct 0 ms 212 KB n = 5, 25 is a correct answer
22 Correct 0 ms 212 KB n = 2, 122 is a correct answer
23 Correct 1 ms 212 KB n = 10, 117 is a correct answer
24 Correct 0 ms 212 KB n = 10, 336 is a correct answer
25 Correct 0 ms 212 KB n = 10, 438 is a correct answer
26 Correct 1 ms 212 KB n = 10, 206 is a correct answer
27 Correct 0 ms 212 KB n = 10, 636 is a correct answer
28 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
29 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
30 Correct 1 ms 212 KB n = 10, 3112 is a correct answer
31 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
32 Correct 4 ms 212 KB n = 50, 197881272 is a correct answer
33 Correct 34 ms 212 KB n = 100, 20969 is a correct answer
34 Correct 35 ms 316 KB n = 100, 20969 is a correct answer
35 Correct 26 ms 324 KB n = 100, 52000000000 is a correct answer
36 Correct 35 ms 316 KB n = 100, 285 is a correct answer
37 Correct 47 ms 304 KB n = 100, 21272 is a correct answer
38 Correct 19 ms 324 KB n = 100, 12161 is a correct answer
39 Correct 1 ms 212 KB n = 2, 62 is a correct answer
40 Correct 1 ms 212 KB n = 2, 3 is a correct answer
41 Correct 1 ms 212 KB n = 3, 29 is a correct answer
42 Correct 1 ms 212 KB n = 2, 3 is a correct answer
43 Correct 1 ms 212 KB n = 2, 3 is a correct answer
44 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
45 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
46 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
47 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
48 Correct 1 ms 304 KB n = 4, 3000000001 is a correct answer
49 Correct 1 ms 340 KB n = 4, 4000000000 is a correct answer
50 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
51 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
52 Correct 1 ms 304 KB n = 10, 3189 is a correct answer
53 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
54 Correct 1 ms 212 KB n = 5, 12 is a correct answer
55 Correct 1 ms 212 KB n = 5, 25 is a correct answer
56 Correct 1 ms 308 KB n = 2, 122 is a correct answer
57 Correct 1 ms 212 KB n = 10, 117 is a correct answer
58 Correct 1 ms 212 KB n = 10, 336 is a correct answer
59 Correct 1 ms 212 KB n = 10, 438 is a correct answer
60 Correct 1 ms 212 KB n = 10, 206 is a correct answer
61 Correct 1 ms 304 KB n = 10, 636 is a correct answer
62 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
63 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
64 Correct 1 ms 340 KB n = 10, 3112 is a correct answer
65 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
66 Correct 5 ms 212 KB n = 50, 197881272 is a correct answer
67 Correct 35 ms 212 KB n = 100, 20969 is a correct answer
68 Correct 35 ms 304 KB n = 100, 20969 is a correct answer
69 Correct 26 ms 212 KB n = 100, 52000000000 is a correct answer
70 Correct 31 ms 212 KB n = 100, 285 is a correct answer
71 Correct 40 ms 320 KB n = 100, 21272 is a correct answer
72 Correct 19 ms 316 KB n = 100, 12161 is a correct answer
73 Correct 621 ms 332 KB n = 250, 25037 is a correct answer
74 Incorrect 576 ms 320 KB n = 250, incorrect answer: jury 199047242 vs contestant 195852144
75 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB n = 4, 80 is a correct answer
2 Correct 0 ms 212 KB n = 9, 110 is a correct answer
3 Correct 1 ms 212 KB n = 4, 21 is a correct answer
4 Correct 0 ms 212 KB n = 3, 4 is a correct answer
5 Correct 0 ms 212 KB n = 2, 62 is a correct answer
6 Correct 1 ms 212 KB n = 2, 3 is a correct answer
7 Correct 0 ms 212 KB n = 3, 29 is a correct answer
8 Correct 0 ms 212 KB n = 2, 3 is a correct answer
9 Correct 0 ms 212 KB n = 2, 3 is a correct answer
10 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
11 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
12 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
13 Correct 0 ms 212 KB n = 3, 3000000000 is a correct answer
14 Correct 1 ms 212 KB n = 4, 3000000001 is a correct answer
15 Correct 1 ms 212 KB n = 4, 4000000000 is a correct answer
16 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
17 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
18 Correct 1 ms 212 KB n = 10, 3189 is a correct answer
19 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
20 Correct 0 ms 212 KB n = 5, 12 is a correct answer
21 Correct 0 ms 212 KB n = 5, 25 is a correct answer
22 Correct 0 ms 212 KB n = 2, 122 is a correct answer
23 Correct 1 ms 212 KB n = 10, 117 is a correct answer
24 Correct 0 ms 212 KB n = 10, 336 is a correct answer
25 Correct 0 ms 212 KB n = 10, 438 is a correct answer
26 Correct 1 ms 212 KB n = 10, 206 is a correct answer
27 Correct 0 ms 212 KB n = 10, 636 is a correct answer
28 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
29 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
30 Correct 1 ms 212 KB n = 10, 3112 is a correct answer
31 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
32 Correct 4 ms 212 KB n = 50, 197881272 is a correct answer
33 Correct 34 ms 212 KB n = 100, 20969 is a correct answer
34 Correct 35 ms 316 KB n = 100, 20969 is a correct answer
35 Correct 26 ms 324 KB n = 100, 52000000000 is a correct answer
36 Correct 35 ms 316 KB n = 100, 285 is a correct answer
37 Correct 47 ms 304 KB n = 100, 21272 is a correct answer
38 Correct 19 ms 324 KB n = 100, 12161 is a correct answer
39 Correct 1 ms 212 KB n = 2, 62 is a correct answer
40 Correct 1 ms 212 KB n = 2, 3 is a correct answer
41 Correct 1 ms 212 KB n = 3, 29 is a correct answer
42 Correct 1 ms 212 KB n = 2, 3 is a correct answer
43 Correct 1 ms 212 KB n = 2, 3 is a correct answer
44 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
45 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
46 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
47 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
48 Correct 1 ms 304 KB n = 4, 3000000001 is a correct answer
49 Correct 1 ms 340 KB n = 4, 4000000000 is a correct answer
50 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
51 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
52 Correct 1 ms 304 KB n = 10, 3189 is a correct answer
53 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
54 Correct 1 ms 212 KB n = 5, 12 is a correct answer
55 Correct 1 ms 212 KB n = 5, 25 is a correct answer
56 Correct 1 ms 308 KB n = 2, 122 is a correct answer
57 Correct 1 ms 212 KB n = 10, 117 is a correct answer
58 Correct 1 ms 212 KB n = 10, 336 is a correct answer
59 Correct 1 ms 212 KB n = 10, 438 is a correct answer
60 Correct 1 ms 212 KB n = 10, 206 is a correct answer
61 Correct 1 ms 304 KB n = 10, 636 is a correct answer
62 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
63 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
64 Correct 1 ms 340 KB n = 10, 3112 is a correct answer
65 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
66 Correct 5 ms 212 KB n = 50, 197881272 is a correct answer
67 Correct 35 ms 212 KB n = 100, 20969 is a correct answer
68 Correct 35 ms 304 KB n = 100, 20969 is a correct answer
69 Correct 26 ms 212 KB n = 100, 52000000000 is a correct answer
70 Correct 31 ms 212 KB n = 100, 285 is a correct answer
71 Correct 40 ms 320 KB n = 100, 21272 is a correct answer
72 Correct 19 ms 316 KB n = 100, 12161 is a correct answer
73 Correct 621 ms 332 KB n = 250, 25037 is a correct answer
74 Incorrect 576 ms 320 KB n = 250, incorrect answer: jury 199047242 vs contestant 195852144
75 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB n = 4, 80 is a correct answer
2 Correct 0 ms 212 KB n = 9, 110 is a correct answer
3 Correct 1 ms 212 KB n = 4, 21 is a correct answer
4 Correct 0 ms 212 KB n = 3, 4 is a correct answer
5 Correct 0 ms 212 KB n = 2, 62 is a correct answer
6 Correct 1 ms 212 KB n = 2, 3 is a correct answer
7 Correct 0 ms 212 KB n = 3, 29 is a correct answer
8 Correct 0 ms 212 KB n = 2, 3 is a correct answer
9 Correct 0 ms 212 KB n = 2, 3 is a correct answer
10 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
11 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
12 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
13 Correct 0 ms 212 KB n = 3, 3000000000 is a correct answer
14 Correct 1 ms 212 KB n = 4, 3000000001 is a correct answer
15 Correct 1 ms 212 KB n = 4, 4000000000 is a correct answer
16 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
17 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
18 Correct 1 ms 212 KB n = 10, 3189 is a correct answer
19 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
20 Correct 0 ms 212 KB n = 5, 12 is a correct answer
21 Correct 0 ms 212 KB n = 5, 25 is a correct answer
22 Correct 0 ms 212 KB n = 2, 122 is a correct answer
23 Correct 1 ms 212 KB n = 10, 117 is a correct answer
24 Correct 0 ms 212 KB n = 10, 336 is a correct answer
25 Correct 0 ms 212 KB n = 10, 438 is a correct answer
26 Correct 1 ms 212 KB n = 10, 206 is a correct answer
27 Correct 0 ms 212 KB n = 10, 636 is a correct answer
28 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
29 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
30 Correct 1 ms 212 KB n = 10, 3112 is a correct answer
31 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
32 Correct 4 ms 212 KB n = 50, 197881272 is a correct answer
33 Correct 34 ms 212 KB n = 100, 20969 is a correct answer
34 Correct 35 ms 316 KB n = 100, 20969 is a correct answer
35 Correct 26 ms 324 KB n = 100, 52000000000 is a correct answer
36 Correct 35 ms 316 KB n = 100, 285 is a correct answer
37 Correct 47 ms 304 KB n = 100, 21272 is a correct answer
38 Correct 19 ms 324 KB n = 100, 12161 is a correct answer
39 Correct 1 ms 212 KB n = 2, 62 is a correct answer
40 Correct 1 ms 212 KB n = 2, 3 is a correct answer
41 Correct 1 ms 212 KB n = 3, 29 is a correct answer
42 Correct 1 ms 212 KB n = 2, 3 is a correct answer
43 Correct 1 ms 212 KB n = 2, 3 is a correct answer
44 Correct 1 ms 212 KB n = 2, 2000000001 is a correct answer
45 Correct 1 ms 212 KB n = 2, 3000000000 is a correct answer
46 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
47 Correct 1 ms 212 KB n = 3, 3000000000 is a correct answer
48 Correct 1 ms 304 KB n = 4, 3000000001 is a correct answer
49 Correct 1 ms 340 KB n = 4, 4000000000 is a correct answer
50 Correct 1 ms 212 KB n = 5, 4000000000 is a correct answer
51 Correct 1 ms 212 KB n = 10, 1000000343 is a correct answer
52 Correct 1 ms 304 KB n = 10, 3189 is a correct answer
53 Correct 1 ms 212 KB n = 10, 7000000000 is a correct answer
54 Correct 1 ms 212 KB n = 5, 12 is a correct answer
55 Correct 1 ms 212 KB n = 5, 25 is a correct answer
56 Correct 1 ms 308 KB n = 2, 122 is a correct answer
57 Correct 1 ms 212 KB n = 10, 117 is a correct answer
58 Correct 1 ms 212 KB n = 10, 336 is a correct answer
59 Correct 1 ms 212 KB n = 10, 438 is a correct answer
60 Correct 1 ms 212 KB n = 10, 206 is a correct answer
61 Correct 1 ms 304 KB n = 10, 636 is a correct answer
62 Correct 1 ms 212 KB n = 4, 2399 is a correct answer
63 Correct 1 ms 212 KB n = 10, 10992 is a correct answer
64 Correct 1 ms 340 KB n = 10, 3112 is a correct answer
65 Correct 27 ms 308 KB n = 100, 51000000001 is a correct answer
66 Correct 5 ms 212 KB n = 50, 197881272 is a correct answer
67 Correct 35 ms 212 KB n = 100, 20969 is a correct answer
68 Correct 35 ms 304 KB n = 100, 20969 is a correct answer
69 Correct 26 ms 212 KB n = 100, 52000000000 is a correct answer
70 Correct 31 ms 212 KB n = 100, 285 is a correct answer
71 Correct 40 ms 320 KB n = 100, 21272 is a correct answer
72 Correct 19 ms 316 KB n = 100, 12161 is a correct answer
73 Correct 621 ms 332 KB n = 250, 25037 is a correct answer
74 Incorrect 576 ms 320 KB n = 250, incorrect answer: jury 199047242 vs contestant 195852144
75 Halted 0 ms 0 KB -