Submission #382783

# Submission time Handle Problem Language Result Execution time Memory
382783 2021-03-28T07:48:46 Z kshitij_sodani Aliens (IOI16_aliens) C++14
25 / 100
5 ms 4332 KB
//#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long llo;
#define mp make_pair
#define pb push_back
#define a first 
#define b second
#define xx int
//#define endl '\n'
 
 
 
#include "aliens.h"
int mi[1000001];
llo dp[100001];
llo cnt[100001];
pair<llo,llo> sect(pair<llo,llo> aa,pair<llo,llo> bb){
   pair<llo,llo> cc={bb.b-aa.b,aa.a-bb.a};
   if(cc.b<0){
      cc.b=-cc.b;
      cc.a=-cc.a;
   }
   return cc;
}
llo eval(pair<llo,llo> aa,llo bb){
   return aa.a*bb+aa.b;
}
vector<pair<llo,llo>> ss;
llo kk;
pair<llo,llo> check(llo mid){
   vector<pair<llo,llo>> ee;
      llo ind=0;
      map<llo,llo> xz;
      for(llo j=0;j<ss.size();j++){
         dp[j]=(ss[j].b-ss[0].a+1);
         dp[j]*=dp[j];
         cnt[j]=1;
         /*if(i==1){
            continue;
         }*/
         if(ee.size()){
            while(ind+1<ee.size()){
               if(eval(ee[ind],ss[j].b)>=eval(ee[ind+1],ss[j].b)){
                  ind++;
               }
               else{
                  break;
               }
            }
            llo ac=eval(ee[ind],ss[j].b)+ss[j].b*ss[j].b;
            if(ac<dp[j]){
               dp[j]=ac;
               cnt[j]=1+cnt[xz[ee[ind].a]];
            }
         }
        /* if(mid==1023 and j==2){
            cout<<ind<<",,"<<endl;
            for(auto j:ee){
               cout<<j.a<<"::"<<j.b<<endl;
            }
         }*/
         dp[j]+=mid;
         if(j+1<ss.size()){
            llo a2=max(ss[j].b+1-ss[j+1].a,(llo)0);
            a2*=a2;
            a2=-a2;
            a2+=(ss[j+1].a-1)*(ss[j+1].a-1);
            a2+=dp[j];
            llo mm=-2*(ss[j+1].a-1);
            pair<llo,llo> ne={mm,a2};
            while(ee.size()>=2){
               pair<llo,llo> ac=sect(ee.back(),ee[ee.size()-2]);
               pair<llo,llo> bc=sect(ee[ee.size()-2],ne);
               //bc<ac
               if(bc.a*ac.b<bc.b*ac.a){
                  ee.pop_back();
               }
               else{
                  break;
               }
            }
            ee.pb({mm,a2});
            xz[ne.a]=j;
         }
      }
    /*  cout<<mid<<"::";
      for(int i=0;i<ss.size();i++){
         cout<<dp[i]<<",";
      }
      cout<<endl;*/
      return {cnt[ss.size()-1],dp[ss.size()-1]-mid*kk};
}
long long take_photos(xx n, xx m, xx k,vector<xx> aa,vector<xx> bb) {
     ss.clear();
    for(llo i=0;i<m;i++){
      mi[i]=-1;
    }
    for(llo i=0;i<n;i++){
      mi[min(aa[i],bb[i])]=max(mi[min(aa[i],bb[i])],max(aa[i],bb[i]));
      
      }
      llo cur=-1;
      for(llo i=0;i<m;i++){
         if(mi[i]!=-1){
            if(mi[i]>cur){
               ss.pb({i,mi[i]});
               cur=mi[i];
            }
         }
      }
/*      for(auto j:ss){
         cout<<j.a<<"::"<<j.b<<endl;
      }*/
     // k=min(k,(int)ss.size());
      kk=k;
      /*for(int i=0;i<ss.size();i++){
         for(int j=1;j<=k+1;j++){
            dp[i].pb(0);
         }
      }*/
      llo low=0;
      for(llo i=60;i>=0;i--){
            if(i>0){
               if((1LL<<(i-1))>m*m){
                  continue;
               }
            }
         //if(low-(1LL<<i)>=0){
            if(check(low+(1LL<<i)).a>=k){
               low+=(1LL<<i);
            }
         //}
      }
     // assert(check(low).a==k);
 
     // cout<<low<<"::"<<endl;
     // cout<<check(low).a<<":"<<check(low).b<<endl;
 
      //cout<<check(low).a<<"::"<<endl;
 
      return check(low).b;
   /* for(llo i=1;i<=k;i++){
         vector<pair<llo,llo>> ee;
         llo ind=0;
         for(llo j=0;j<ss.size();j++){
            dp[j][i]=(ss[j].b-ss[0].a+1);
            dp[j][i]*=dp[j][i];
            if(i==1){
               continue;
            }
            if(ee.size()){
               while(ind+1<ee.size()){
                  if(eval(ee[ind],ss[j].b)>=eval(ee[ind+1],ss[j].b)){
                     ind++;
                  }
                  else{
                     break;
                  }
               }
               dp[j][i]=min(dp[j][i],eval(ee[ind],ss[j].b)+ss[j].b*ss[j].b);
            }
            if(j+1<ss.size()){
               llo a2=max(ss[j].b+1-ss[j+1].a,(llo)0);
               a2*=a2;
               a2=-a2;
               a2+=(ss[j+1].a-1)*(ss[j+1].a-1);
               a2+=dp[j][i-1];
               llo mm=-2*(ss[j+1].a-1);
               pair<llo,llo> ne={mm,a2};
               while(ee.size()>=2){
                  pair<llo,llo> ac=sect(ee.back(),ee[ee.size()-2]);
                  pair<llo,llo> bc=sect(ee[ee.size()-2],ne);
                  //bc<ac
                  if(bc.a*ac.b<bc.b*ac.a){
                     ee.pop_back();
                  }
                  else{
                     break;
                  }
               }
               ee.pb({mm,a2});
            }
         }
      }*/
  /*  for(llo i=1;i<=k;i++){
         for(llo j=0;j<ss.size();j++){
            cout<<dp[j][i]<<",";
         }
         cout<<endl;
      }*/
      /*cout<<dp[0][1]<<"::"<<dp[1][1]<<endl;
      for(auto j:ss){
         cout<<j.a<<":"<<j.b<<endl;
      }
      cout<<endl;
*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  //  return dp[ss.size()-1][k];
}

Compilation message

aliens.cpp: In function 'std::pair<long long int, long long int> check(llo)':
aliens.cpp:35:20: warning: comparison of integer expressions of different signedness: 'llo' {aka 'long long int'} and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   35 |       for(llo j=0;j<ss.size();j++){
      |                   ~^~~~~~~~~~
aliens.cpp:43:24: warning: comparison of integer expressions of different signedness: 'llo' {aka 'long long int'} and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   43 |             while(ind+1<ee.size()){
      |                   ~~~~~^~~~~~~~~~
aliens.cpp:64:16: warning: comparison of integer expressions of different signedness: 'llo' {aka 'long long int'} and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   64 |          if(j+1<ss.size()){
      |             ~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Correct answer: answer = 4
2 Correct 1 ms 364 KB Correct answer: answer = 4
3 Correct 1 ms 364 KB Correct answer: answer = 4
4 Correct 1 ms 364 KB Correct answer: answer = 12
5 Correct 1 ms 364 KB Correct answer: answer = 52
6 Correct 1 ms 364 KB Correct answer: answer = 210
7 Correct 1 ms 364 KB Correct answer: answer = 88
8 Correct 1 ms 364 KB Correct answer: answer = 7696
9 Correct 2 ms 364 KB Correct answer: answer = 1
10 Correct 1 ms 364 KB Correct answer: answer = 2374
11 Correct 1 ms 364 KB Correct answer: answer = 9502
12 Correct 1 ms 364 KB Correct answer: answer = 49
13 Correct 1 ms 364 KB Correct answer: answer = 151
14 Correct 1 ms 364 KB Correct answer: answer = 7550
15 Correct 1 ms 364 KB Correct answer: answer = 7220
16 Correct 1 ms 364 KB Correct answer: answer = 7550
17 Correct 1 ms 364 KB Correct answer: answer = 10000
18 Correct 1 ms 364 KB Correct answer: answer = 10000
19 Correct 1 ms 364 KB Correct answer: answer = 624
20 Correct 1 ms 364 KB Correct answer: answer = 10000
# Verdict Execution time Memory Grader output
1 Correct 2 ms 364 KB Correct answer: answer = 1
2 Correct 1 ms 364 KB Correct answer: answer = 4
3 Correct 1 ms 364 KB Correct answer: answer = 1
4 Correct 1 ms 364 KB Correct answer: answer = 5
5 Correct 1 ms 364 KB Correct answer: answer = 41
6 Correct 1 ms 364 KB Correct answer: answer = 71923
7 Correct 2 ms 364 KB Correct answer: answer = 77137
8 Correct 2 ms 364 KB Correct answer: answer = 764
9 Correct 3 ms 364 KB Correct answer: answer = 250000
10 Correct 3 ms 364 KB Correct answer: answer = 500
11 Correct 1 ms 364 KB Correct answer: answer = 32
12 Correct 2 ms 364 KB Correct answer: answer = 130050
13 Correct 3 ms 364 KB Correct answer: answer = 5110
14 Correct 2 ms 364 KB Correct answer: answer = 2626
15 Correct 2 ms 364 KB Correct answer: answer = 796
16 Correct 3 ms 364 KB Correct answer: answer = 7580
17 Correct 3 ms 364 KB Correct answer: answer = 1904
18 Correct 2 ms 364 KB Correct answer: answer = 996004
19 Correct 2 ms 364 KB Correct answer: answer = 38817
20 Correct 2 ms 364 KB Correct answer: answer = 4096
21 Correct 1 ms 364 KB Correct answer: answer = 1
22 Correct 1 ms 364 KB Correct answer: answer = 1
23 Correct 3 ms 364 KB Correct answer: answer = 2040
24 Correct 1 ms 364 KB Correct answer: answer = 2
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Correct answer: answer = 4
2 Correct 1 ms 364 KB Correct answer: answer = 4
3 Correct 1 ms 364 KB Correct answer: answer = 4
4 Correct 1 ms 364 KB Correct answer: answer = 12
5 Correct 1 ms 364 KB Correct answer: answer = 52
6 Correct 1 ms 364 KB Correct answer: answer = 210
7 Correct 1 ms 364 KB Correct answer: answer = 88
8 Correct 1 ms 364 KB Correct answer: answer = 7696
9 Correct 2 ms 364 KB Correct answer: answer = 1
10 Correct 1 ms 364 KB Correct answer: answer = 2374
11 Correct 1 ms 364 KB Correct answer: answer = 9502
12 Correct 1 ms 364 KB Correct answer: answer = 49
13 Correct 1 ms 364 KB Correct answer: answer = 151
14 Correct 1 ms 364 KB Correct answer: answer = 7550
15 Correct 1 ms 364 KB Correct answer: answer = 7220
16 Correct 1 ms 364 KB Correct answer: answer = 7550
17 Correct 1 ms 364 KB Correct answer: answer = 10000
18 Correct 1 ms 364 KB Correct answer: answer = 10000
19 Correct 1 ms 364 KB Correct answer: answer = 624
20 Correct 1 ms 364 KB Correct answer: answer = 10000
21 Correct 2 ms 364 KB Correct answer: answer = 1
22 Correct 1 ms 364 KB Correct answer: answer = 4
23 Correct 1 ms 364 KB Correct answer: answer = 1
24 Correct 1 ms 364 KB Correct answer: answer = 5
25 Correct 1 ms 364 KB Correct answer: answer = 41
26 Correct 1 ms 364 KB Correct answer: answer = 71923
27 Correct 2 ms 364 KB Correct answer: answer = 77137
28 Correct 2 ms 364 KB Correct answer: answer = 764
29 Correct 3 ms 364 KB Correct answer: answer = 250000
30 Correct 3 ms 364 KB Correct answer: answer = 500
31 Correct 1 ms 364 KB Correct answer: answer = 32
32 Correct 2 ms 364 KB Correct answer: answer = 130050
33 Correct 3 ms 364 KB Correct answer: answer = 5110
34 Correct 2 ms 364 KB Correct answer: answer = 2626
35 Correct 2 ms 364 KB Correct answer: answer = 796
36 Correct 3 ms 364 KB Correct answer: answer = 7580
37 Correct 3 ms 364 KB Correct answer: answer = 1904
38 Correct 2 ms 364 KB Correct answer: answer = 996004
39 Correct 2 ms 364 KB Correct answer: answer = 38817
40 Correct 2 ms 364 KB Correct answer: answer = 4096
41 Correct 1 ms 364 KB Correct answer: answer = 1
42 Correct 1 ms 364 KB Correct answer: answer = 1
43 Correct 3 ms 364 KB Correct answer: answer = 2040
44 Correct 1 ms 364 KB Correct answer: answer = 2
45 Correct 1 ms 364 KB Correct answer: answer = 4
46 Correct 1 ms 364 KB Correct answer: answer = 9
47 Correct 1 ms 364 KB Correct answer: answer = 9
48 Correct 1 ms 364 KB Correct answer: answer = 21
49 Correct 1 ms 364 KB Correct answer: answer = 71
50 Correct 1 ms 364 KB Correct answer: answer = 77
51 Correct 1 ms 364 KB Correct answer: answer = 400
52 Correct 1 ms 364 KB Correct answer: answer = 996004
53 Correct 1 ms 364 KB Correct answer: answer = 997310
54 Correct 1 ms 364 KB Correct answer: answer = 990781
55 Correct 1 ms 364 KB Correct answer: answer = 996545
56 Correct 2 ms 364 KB Correct answer: answer = 484
57 Correct 1 ms 364 KB Correct answer: answer = 484
58 Correct 3 ms 364 KB Correct answer: answer = 63501
59 Correct 3 ms 364 KB Correct answer: answer = 323501
60 Correct 3 ms 364 KB Correct answer: answer = 752500
61 Correct 2 ms 364 KB Correct answer: answer = 761480
62 Correct 2 ms 364 KB Correct answer: answer = 758932
63 Correct 1 ms 364 KB Correct answer: answer = 1000000
64 Correct 3 ms 384 KB Correct answer: answer = 750500
65 Correct 1 ms 364 KB Correct answer: answer = 1000000
66 Correct 1 ms 364 KB Correct answer: answer = 250000
67 Correct 1 ms 364 KB Correct answer: answer = 250000
68 Correct 1 ms 364 KB Correct answer: answer = 1000000
69 Correct 1 ms 364 KB Correct answer: answer = 994009
70 Correct 2 ms 364 KB Correct answer: answer = 59315
71 Correct 2 ms 364 KB Correct answer: answer = 25454
72 Correct 3 ms 364 KB Correct answer: answer = 1504
73 Correct 1 ms 364 KB Correct answer: answer = 37486
74 Correct 2 ms 364 KB Correct answer: answer = 4284
75 Correct 1 ms 364 KB Correct answer: answer = 158008
76 Correct 2 ms 380 KB Correct answer: answer = 51860
77 Correct 1 ms 364 KB Correct answer: answer = 12985
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Correct answer: answer = 4
2 Correct 1 ms 364 KB Correct answer: answer = 4
3 Correct 1 ms 364 KB Correct answer: answer = 4
4 Correct 1 ms 364 KB Correct answer: answer = 12
5 Correct 1 ms 364 KB Correct answer: answer = 52
6 Correct 1 ms 364 KB Correct answer: answer = 210
7 Correct 1 ms 364 KB Correct answer: answer = 88
8 Correct 1 ms 364 KB Correct answer: answer = 7696
9 Correct 2 ms 364 KB Correct answer: answer = 1
10 Correct 1 ms 364 KB Correct answer: answer = 2374
11 Correct 1 ms 364 KB Correct answer: answer = 9502
12 Correct 1 ms 364 KB Correct answer: answer = 49
13 Correct 1 ms 364 KB Correct answer: answer = 151
14 Correct 1 ms 364 KB Correct answer: answer = 7550
15 Correct 1 ms 364 KB Correct answer: answer = 7220
16 Correct 1 ms 364 KB Correct answer: answer = 7550
17 Correct 1 ms 364 KB Correct answer: answer = 10000
18 Correct 1 ms 364 KB Correct answer: answer = 10000
19 Correct 1 ms 364 KB Correct answer: answer = 624
20 Correct 1 ms 364 KB Correct answer: answer = 10000
21 Correct 2 ms 364 KB Correct answer: answer = 1
22 Correct 1 ms 364 KB Correct answer: answer = 4
23 Correct 1 ms 364 KB Correct answer: answer = 1
24 Correct 1 ms 364 KB Correct answer: answer = 5
25 Correct 1 ms 364 KB Correct answer: answer = 41
26 Correct 1 ms 364 KB Correct answer: answer = 71923
27 Correct 2 ms 364 KB Correct answer: answer = 77137
28 Correct 2 ms 364 KB Correct answer: answer = 764
29 Correct 3 ms 364 KB Correct answer: answer = 250000
30 Correct 3 ms 364 KB Correct answer: answer = 500
31 Correct 1 ms 364 KB Correct answer: answer = 32
32 Correct 2 ms 364 KB Correct answer: answer = 130050
33 Correct 3 ms 364 KB Correct answer: answer = 5110
34 Correct 2 ms 364 KB Correct answer: answer = 2626
35 Correct 2 ms 364 KB Correct answer: answer = 796
36 Correct 3 ms 364 KB Correct answer: answer = 7580
37 Correct 3 ms 364 KB Correct answer: answer = 1904
38 Correct 2 ms 364 KB Correct answer: answer = 996004
39 Correct 2 ms 364 KB Correct answer: answer = 38817
40 Correct 2 ms 364 KB Correct answer: answer = 4096
41 Correct 1 ms 364 KB Correct answer: answer = 1
42 Correct 1 ms 364 KB Correct answer: answer = 1
43 Correct 3 ms 364 KB Correct answer: answer = 2040
44 Correct 1 ms 364 KB Correct answer: answer = 2
45 Correct 1 ms 364 KB Correct answer: answer = 4
46 Correct 1 ms 364 KB Correct answer: answer = 9
47 Correct 1 ms 364 KB Correct answer: answer = 9
48 Correct 1 ms 364 KB Correct answer: answer = 21
49 Correct 1 ms 364 KB Correct answer: answer = 71
50 Correct 1 ms 364 KB Correct answer: answer = 77
51 Correct 1 ms 364 KB Correct answer: answer = 400
52 Correct 1 ms 364 KB Correct answer: answer = 996004
53 Correct 1 ms 364 KB Correct answer: answer = 997310
54 Correct 1 ms 364 KB Correct answer: answer = 990781
55 Correct 1 ms 364 KB Correct answer: answer = 996545
56 Correct 2 ms 364 KB Correct answer: answer = 484
57 Correct 1 ms 364 KB Correct answer: answer = 484
58 Correct 3 ms 364 KB Correct answer: answer = 63501
59 Correct 3 ms 364 KB Correct answer: answer = 323501
60 Correct 3 ms 364 KB Correct answer: answer = 752500
61 Correct 2 ms 364 KB Correct answer: answer = 761480
62 Correct 2 ms 364 KB Correct answer: answer = 758932
63 Correct 1 ms 364 KB Correct answer: answer = 1000000
64 Correct 3 ms 384 KB Correct answer: answer = 750500
65 Correct 1 ms 364 KB Correct answer: answer = 1000000
66 Correct 1 ms 364 KB Correct answer: answer = 250000
67 Correct 1 ms 364 KB Correct answer: answer = 250000
68 Correct 1 ms 364 KB Correct answer: answer = 1000000
69 Correct 1 ms 364 KB Correct answer: answer = 994009
70 Correct 2 ms 364 KB Correct answer: answer = 59315
71 Correct 2 ms 364 KB Correct answer: answer = 25454
72 Correct 3 ms 364 KB Correct answer: answer = 1504
73 Correct 1 ms 364 KB Correct answer: answer = 37486
74 Correct 2 ms 364 KB Correct answer: answer = 4284
75 Correct 1 ms 364 KB Correct answer: answer = 158008
76 Correct 2 ms 380 KB Correct answer: answer = 51860
77 Correct 1 ms 364 KB Correct answer: answer = 12985
78 Incorrect 5 ms 4332 KB Wrong answer: output = 997709055051, expected = 997864126212
79 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Correct answer: answer = 4
2 Correct 1 ms 364 KB Correct answer: answer = 4
3 Correct 1 ms 364 KB Correct answer: answer = 4
4 Correct 1 ms 364 KB Correct answer: answer = 12
5 Correct 1 ms 364 KB Correct answer: answer = 52
6 Correct 1 ms 364 KB Correct answer: answer = 210
7 Correct 1 ms 364 KB Correct answer: answer = 88
8 Correct 1 ms 364 KB Correct answer: answer = 7696
9 Correct 2 ms 364 KB Correct answer: answer = 1
10 Correct 1 ms 364 KB Correct answer: answer = 2374
11 Correct 1 ms 364 KB Correct answer: answer = 9502
12 Correct 1 ms 364 KB Correct answer: answer = 49
13 Correct 1 ms 364 KB Correct answer: answer = 151
14 Correct 1 ms 364 KB Correct answer: answer = 7550
15 Correct 1 ms 364 KB Correct answer: answer = 7220
16 Correct 1 ms 364 KB Correct answer: answer = 7550
17 Correct 1 ms 364 KB Correct answer: answer = 10000
18 Correct 1 ms 364 KB Correct answer: answer = 10000
19 Correct 1 ms 364 KB Correct answer: answer = 624
20 Correct 1 ms 364 KB Correct answer: answer = 10000
21 Correct 2 ms 364 KB Correct answer: answer = 1
22 Correct 1 ms 364 KB Correct answer: answer = 4
23 Correct 1 ms 364 KB Correct answer: answer = 1
24 Correct 1 ms 364 KB Correct answer: answer = 5
25 Correct 1 ms 364 KB Correct answer: answer = 41
26 Correct 1 ms 364 KB Correct answer: answer = 71923
27 Correct 2 ms 364 KB Correct answer: answer = 77137
28 Correct 2 ms 364 KB Correct answer: answer = 764
29 Correct 3 ms 364 KB Correct answer: answer = 250000
30 Correct 3 ms 364 KB Correct answer: answer = 500
31 Correct 1 ms 364 KB Correct answer: answer = 32
32 Correct 2 ms 364 KB Correct answer: answer = 130050
33 Correct 3 ms 364 KB Correct answer: answer = 5110
34 Correct 2 ms 364 KB Correct answer: answer = 2626
35 Correct 2 ms 364 KB Correct answer: answer = 796
36 Correct 3 ms 364 KB Correct answer: answer = 7580
37 Correct 3 ms 364 KB Correct answer: answer = 1904
38 Correct 2 ms 364 KB Correct answer: answer = 996004
39 Correct 2 ms 364 KB Correct answer: answer = 38817
40 Correct 2 ms 364 KB Correct answer: answer = 4096
41 Correct 1 ms 364 KB Correct answer: answer = 1
42 Correct 1 ms 364 KB Correct answer: answer = 1
43 Correct 3 ms 364 KB Correct answer: answer = 2040
44 Correct 1 ms 364 KB Correct answer: answer = 2
45 Correct 1 ms 364 KB Correct answer: answer = 4
46 Correct 1 ms 364 KB Correct answer: answer = 9
47 Correct 1 ms 364 KB Correct answer: answer = 9
48 Correct 1 ms 364 KB Correct answer: answer = 21
49 Correct 1 ms 364 KB Correct answer: answer = 71
50 Correct 1 ms 364 KB Correct answer: answer = 77
51 Correct 1 ms 364 KB Correct answer: answer = 400
52 Correct 1 ms 364 KB Correct answer: answer = 996004
53 Correct 1 ms 364 KB Correct answer: answer = 997310
54 Correct 1 ms 364 KB Correct answer: answer = 990781
55 Correct 1 ms 364 KB Correct answer: answer = 996545
56 Correct 2 ms 364 KB Correct answer: answer = 484
57 Correct 1 ms 364 KB Correct answer: answer = 484
58 Correct 3 ms 364 KB Correct answer: answer = 63501
59 Correct 3 ms 364 KB Correct answer: answer = 323501
60 Correct 3 ms 364 KB Correct answer: answer = 752500
61 Correct 2 ms 364 KB Correct answer: answer = 761480
62 Correct 2 ms 364 KB Correct answer: answer = 758932
63 Correct 1 ms 364 KB Correct answer: answer = 1000000
64 Correct 3 ms 384 KB Correct answer: answer = 750500
65 Correct 1 ms 364 KB Correct answer: answer = 1000000
66 Correct 1 ms 364 KB Correct answer: answer = 250000
67 Correct 1 ms 364 KB Correct answer: answer = 250000
68 Correct 1 ms 364 KB Correct answer: answer = 1000000
69 Correct 1 ms 364 KB Correct answer: answer = 994009
70 Correct 2 ms 364 KB Correct answer: answer = 59315
71 Correct 2 ms 364 KB Correct answer: answer = 25454
72 Correct 3 ms 364 KB Correct answer: answer = 1504
73 Correct 1 ms 364 KB Correct answer: answer = 37486
74 Correct 2 ms 364 KB Correct answer: answer = 4284
75 Correct 1 ms 364 KB Correct answer: answer = 158008
76 Correct 2 ms 380 KB Correct answer: answer = 51860
77 Correct 1 ms 364 KB Correct answer: answer = 12985
78 Incorrect 5 ms 4332 KB Wrong answer: output = 997709055051, expected = 997864126212
79 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Correct answer: answer = 4
2 Correct 1 ms 364 KB Correct answer: answer = 4
3 Correct 1 ms 364 KB Correct answer: answer = 4
4 Correct 1 ms 364 KB Correct answer: answer = 12
5 Correct 1 ms 364 KB Correct answer: answer = 52
6 Correct 1 ms 364 KB Correct answer: answer = 210
7 Correct 1 ms 364 KB Correct answer: answer = 88
8 Correct 1 ms 364 KB Correct answer: answer = 7696
9 Correct 2 ms 364 KB Correct answer: answer = 1
10 Correct 1 ms 364 KB Correct answer: answer = 2374
11 Correct 1 ms 364 KB Correct answer: answer = 9502
12 Correct 1 ms 364 KB Correct answer: answer = 49
13 Correct 1 ms 364 KB Correct answer: answer = 151
14 Correct 1 ms 364 KB Correct answer: answer = 7550
15 Correct 1 ms 364 KB Correct answer: answer = 7220
16 Correct 1 ms 364 KB Correct answer: answer = 7550
17 Correct 1 ms 364 KB Correct answer: answer = 10000
18 Correct 1 ms 364 KB Correct answer: answer = 10000
19 Correct 1 ms 364 KB Correct answer: answer = 624
20 Correct 1 ms 364 KB Correct answer: answer = 10000
21 Correct 2 ms 364 KB Correct answer: answer = 1
22 Correct 1 ms 364 KB Correct answer: answer = 4
23 Correct 1 ms 364 KB Correct answer: answer = 1
24 Correct 1 ms 364 KB Correct answer: answer = 5
25 Correct 1 ms 364 KB Correct answer: answer = 41
26 Correct 1 ms 364 KB Correct answer: answer = 71923
27 Correct 2 ms 364 KB Correct answer: answer = 77137
28 Correct 2 ms 364 KB Correct answer: answer = 764
29 Correct 3 ms 364 KB Correct answer: answer = 250000
30 Correct 3 ms 364 KB Correct answer: answer = 500
31 Correct 1 ms 364 KB Correct answer: answer = 32
32 Correct 2 ms 364 KB Correct answer: answer = 130050
33 Correct 3 ms 364 KB Correct answer: answer = 5110
34 Correct 2 ms 364 KB Correct answer: answer = 2626
35 Correct 2 ms 364 KB Correct answer: answer = 796
36 Correct 3 ms 364 KB Correct answer: answer = 7580
37 Correct 3 ms 364 KB Correct answer: answer = 1904
38 Correct 2 ms 364 KB Correct answer: answer = 996004
39 Correct 2 ms 364 KB Correct answer: answer = 38817
40 Correct 2 ms 364 KB Correct answer: answer = 4096
41 Correct 1 ms 364 KB Correct answer: answer = 1
42 Correct 1 ms 364 KB Correct answer: answer = 1
43 Correct 3 ms 364 KB Correct answer: answer = 2040
44 Correct 1 ms 364 KB Correct answer: answer = 2
45 Correct 1 ms 364 KB Correct answer: answer = 4
46 Correct 1 ms 364 KB Correct answer: answer = 9
47 Correct 1 ms 364 KB Correct answer: answer = 9
48 Correct 1 ms 364 KB Correct answer: answer = 21
49 Correct 1 ms 364 KB Correct answer: answer = 71
50 Correct 1 ms 364 KB Correct answer: answer = 77
51 Correct 1 ms 364 KB Correct answer: answer = 400
52 Correct 1 ms 364 KB Correct answer: answer = 996004
53 Correct 1 ms 364 KB Correct answer: answer = 997310
54 Correct 1 ms 364 KB Correct answer: answer = 990781
55 Correct 1 ms 364 KB Correct answer: answer = 996545
56 Correct 2 ms 364 KB Correct answer: answer = 484
57 Correct 1 ms 364 KB Correct answer: answer = 484
58 Correct 3 ms 364 KB Correct answer: answer = 63501
59 Correct 3 ms 364 KB Correct answer: answer = 323501
60 Correct 3 ms 364 KB Correct answer: answer = 752500
61 Correct 2 ms 364 KB Correct answer: answer = 761480
62 Correct 2 ms 364 KB Correct answer: answer = 758932
63 Correct 1 ms 364 KB Correct answer: answer = 1000000
64 Correct 3 ms 384 KB Correct answer: answer = 750500
65 Correct 1 ms 364 KB Correct answer: answer = 1000000
66 Correct 1 ms 364 KB Correct answer: answer = 250000
67 Correct 1 ms 364 KB Correct answer: answer = 250000
68 Correct 1 ms 364 KB Correct answer: answer = 1000000
69 Correct 1 ms 364 KB Correct answer: answer = 994009
70 Correct 2 ms 364 KB Correct answer: answer = 59315
71 Correct 2 ms 364 KB Correct answer: answer = 25454
72 Correct 3 ms 364 KB Correct answer: answer = 1504
73 Correct 1 ms 364 KB Correct answer: answer = 37486
74 Correct 2 ms 364 KB Correct answer: answer = 4284
75 Correct 1 ms 364 KB Correct answer: answer = 158008
76 Correct 2 ms 380 KB Correct answer: answer = 51860
77 Correct 1 ms 364 KB Correct answer: answer = 12985
78 Incorrect 5 ms 4332 KB Wrong answer: output = 997709055051, expected = 997864126212
79 Halted 0 ms 0 KB -