Submission #1004786

#TimeUsernameProblemLanguageResultExecution timeMemory
1004786sam__in07Tarifa (COCI16_tarifa)C++14
0 / 50
28 ms524 KiB
/* ⣿⣿⣿⣿⡿⠟⠛⠋⠉⠉⠉⠉⠉⠛⠛⠻⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⠟⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠈⠙⠾⣿⣾⣿⣾⣿⣾⣿⣾⣿ ⠋⡁⠀⠀⠀⠀⠀⢀⠔⠁⠀⠀⢀⠠⠐⠈⠁⠀⠀⠁⠀⠈⠻⢾⣿⣾⣿⣾⣟⣿ ⠊⠀⠀⠀⠀⢀⠔⠃⠀⠀⠠⠈⠁⠀⠀⠀⠀⠀⠀⠆⠀⠀⠄⠀⠙⣾⣷⣿⢿⣿ ⠀⠀⠀⠀⡠⠉⠀⠀⠀⠀⠠⢰⢀⠀⠀⠀⠀⠀⠀⢰⠀⠀⠈⡀⠀⠈⢿⣟⣿⣿ ⠀⠀⢀⡜⣐⠃⠀⠀⠀⣠⠁⡄⠰⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠰⠀⠀⠈⢿⣿⣿ ⠀⢠⠆⢠⡃⠀⠀⠀⣔⠆⡘⡇⢘⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿ ⢀⡆⠀⡼⢣⠀⢀⠌⢸⢠⠇⡇⢘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿ ⣼⣃⠀⠁⢸⢀⠎⠀⢸⠎⠀⢸⢸⡄⠀⠀⠀⠀⠀⠂⢀⠀⠀⠀⠀⠀⠀⠀⠀⣿ ⠃⡏⠟⣷⣤⠁⠀⠀⠸⠀⠀⡾⢀⢇⠀⠀⠀⠀⠀⠄⠸⠀⠀⠀⠀⠄⠀⠀⠀⣿ ⠀⠀⣀⣿⣿⣿⢦⠀⠀⠀⠀⡧⠋⠘⡄⠀⠀⠀⠀⡇⢸⠀⠀⠠⡘⠀⠀⠀⢠⣿ ⠈⠀⢿⢗⡻⠃⠀⠀⠀⠀⠀⠀⠀⠀⠱⡀⠀⠀⢰⠁⡇⠀⠀⢨⠃⡄⢀⠀⣸⣿ ⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣱⠀⠀⡎⠸⠁⠀⢀⠞⡸⠀⡜⢠⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣺⣿⣧⢰⣧⡁⡄⠀⡞⠰⠁⡸⣠⣿⣿⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⡿⠏⣿⠟⢁⠾⢛⣧⢼⠁⠀⠀⢰⣿⡿⣷⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠡⠄⠀⡠⣚⡷⠊⠀⠀⠀⣿⡿⣿⡿⣿ ⡀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠊⠁⢸⠁⠀⠀⠀⢰⣿⣿⡿⣿⣿ ⠱⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠊⠀⠀⠀⡞⠀⠀⠀⠀⢸⣿⣷⣿⣿⣿ /*"kawaiiiiiii!!!!!!!!!!!"*\ ⠀⠙⢦⣀⠀⠀⠀⠀⠀⢀⣀⣠⠖⠁⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⣸⣿⣾⡿⣷⣿ ⠀⠀⠀⠀⠉⠉⣩⡞⠉⠁⠀⢸⡄⠀⠀⠀⠀⠀⢰⠇⠀⠀⠀⠀⣿⣿⣷⣿⣿⣿ ⡆⠀⠀⣀⡠⠞⠁⣧⢤⣀⣀⣀⡇⠀⠀⠀⠀⠀⣸⠀⠀⠀⠀⠀⣿⣷⣿⣷⣿⣿ ⣿⣷⠊⠁⠀⠀⡰⠁⠀⠀⠀⠀⣹⠶⢦⡀⠀⠀⡇⠀⠀⠀⠀⠀⢸⣿⣷⣿⣷⣿ ⣿⢿⠀⠀⠀⡔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⡄⡇⠀⠀⠀⠀⠀⠈⣿⣾⣷⣿⣿ ⠋⠈⠀⢀⠜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠈⣧⠀⠀⠀⠀⠀⠀⠻⣿⣽⣾⣿ ⢀⡄⡠⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠁⠀⠀⠀⣸⠀⠀⠀⠀⠀⠀⠀⣿⣿⣻⣿ ⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⢰⠀⠐⠀⠀⠀⠀⣀⡿⠀⠀⠀⠀⠀⠀⠀⢹⣿⣻⣿ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡼⠀⠀⠀⠀⠀⢀⣃⡇⠀⠲⡀⠀⠀⠀⠀⠈⣿⡿⣿ ⣀⠤⠤⠤⡀⠀⠀⠀⠀⡴⠃⠀⠀⠀⠀⠀⢬⠞⡇⠀⠀⠇⠀⠀⠀⠀⠀⣿⣿⣿ ⡁⢀⠀⠀⡇⠀⠀⠀⡼⠁⠀⠀⠀⠀⠀⣸⠁⠀⠇⠀⠀⡇⠀⠀⠀⠀⠀⣿⣿⣿ ⠔⠃⠀⠀⡇⠀⠀⡼⠁⠀⠀⠀⠀⠀⢀⡇⠀⠀⡃⠀⠀⠙⢄⠀⠀⠀⠀⣿⣷⣿ ⠒⠊⠀⠀⢸⠀⣸⠃⠀⠀⠀⠀⠀⠀⡞⠀⠀⠀⢅⠀⠀⡂⠸⡄⠀⠀⠀⣿⣟⣿ ⠓⠀⠉⠀⢸⣰⠃⠀⠀⠀⠀⠀⠀⡜⡆⠀⠀⠀⢸⠀⠀⡇⢀⠇⠀⠀⠀⣿⣿⣿ ⠉⠁⠀⢠⠞⠀⠀⠀⠀⠀⠀⠀⣰⠁⡇⠀⠀⠀⡇⠀⠀⡇⢸⠀⠀⠀⠀⣿⣷⣿ ⡀⠀⢀⢿⣥⡤⠤⠤⠤⣀⣀⢠⠇⠀⢸⠀⠀⢰⠁⠀⢨⠀⢸⠀⠀⠀ ⣿⣟⣿ */ /* /* writer : chainsa_min *\ time : 20:45:34 */ #include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; // hellow it's me .. "me ?" you beloved bastard_chao_min :] and tnx to you for reading my code #define ll long long #define maxi 1e17 #define MOD 1e9 + 7 #define pie 3.14159265358979323846264338327 #define nissan for (i=0; i<n; i++) #define skyline for(i=1;i<=n;i++) #define AE86 for(i=0;i<n-1;i++) #define Rx7 for(i=1;i<n;i++) //Mazda RX-7 Savana. #define in cin>>n #define on string s #define up cin >> s #define be(v) v.begin(), v.end()//v(n) #define sbe(v); sort( v.begin(), v.end())//v(n) /* ´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´HELLO´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´ */ /* _________________________It's Me DEADPOOL!! (>‿◠)✌´ _________________________*/ #define mii map<int,int>v; #define mcl map<char,ll> #define msl map<string,ll> #define emb emplace_back #define mpi make_pair #define seti pair<ll,ll> #define pub push_back #define vei vector<int> #define ves vector<string> #define vec vector<char> #define vpl vector<seti> #define deq deque<ll> #define maxv(a,b) (a)=max((a),(b)) // set a to the maximum of a and b #define minv(a,b) (a)=min((a),(b)); #define debv(v) for(auto it : v) cout << it << " "; #define deb(x) cout << #x << " = " << x << " "; #define vel vector<ll> #define bv2 bitset<14> b(v[i])//2^n = x n = 16 32 64 ...... #define b32 bitset<32> #define chifuyu iota(v.begin(), v.end(), 1) #define mustano accumulate(v.begin(), v.end(), 0LL) #define sei set<ll> #define mappa map<ll,ll> #define sj7 ara[n] #define supra ara[i] #define matsuno nissan { cin >> ara[i] ;} #define dazai nissan {cin >> v[i];} #define dbg(a) cerr << __LINE__ << ": " << #a << " = " << a << '\n' #define optimus_prime vector<int>::iterator it #define flash cout << *it << endlll // if(*it==n) *it = x (x replacing n && sit on this place) #define nsx_r cin >> ara[i] #define evo n = s.size(); #define ash ll j , i, n , m ,sums , a , b, c,d, val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0 #define gtr '\n' // double sub_x = pow(x1 - x2, 2); #define chainsaw cout << "YES" <<gtr #define vapub nissan { cin >> x; v.pub(x);} #define man cout << "NO"<<gtr #define se ' ' #define se2 " " #define tithi s.begin(), s.end() // dont think she my gf -;( she is mine own little sister -:} #define mitsuha_wifu ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define kyouka_chan freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout); #define folafol(x) cout << x << gtr ; #define folafol_1(x,y) cout << x << se2 << y ; #define she(a,b,i) for (ll i = a; i < b; i++) #define her(a,b,i) for (ll i = a; i <=b; i++) #define bjt(a,b,i) for(ll i = a ; i>=b ; i-- ) #define ss second #define println(x) cout << x << gtr ; #define folafol_2(x,y) cout << x << " " << y ; cout << gtr ; #define sayonara return 0 #define lancer_ ll guts ; cin >> guts ; while(guts--) //---------------------------start--------------------------------- // const int MOD = 1e9 + 7; // double average = static_cast<double>(sum) / n; // sort(a(v), greater<ll>()); means reverse(a(v)) ; ll binarySearch(ll array[], ll x, ll low, ll high) { while (low <= high) { int mid = low + (high - low) / 2; if (array[mid] == x) return mid; if (array[mid] < x) low = mid + 1; else high = mid - 1; } return -1; } bool comp_are (seti a , seti b) { if(a.first==b.first){ return a.second<b.second ; } else return a.first > b.first; } bool comps (seti a , seti b) { if((a.first == b.first)) return (a.second > b.second); else return (a.first<b.first) ; } // for 2 pointer l = 0 r= n-1 \ ll tringle(ll a , ll b, ll c ) { if((a+b)>c && (b+c)>a && (c+a)>b) { return 1 ; } else return 0 ; } ll segment (ll a , ll b, ll c ) { if((a+b)==c || (b+c)==a || (c+a)==b) { return 1 ; } else return 0 ; } ll N = 500; int main (){ mitsuha_wifu ; bool flag = 0 ; // true #ifndef ONLINE_JUDGE kyouka_chan ; #endif //lancer_ { ash; in >> m; n*=(m+1); for(i=0;i<m;i++){ cin>>a ; n-=a; } println(n); return 0; } return 0; }

Compilation message (stderr)

tarifa.cpp:19:95: warning: "/*" within comment [-Wcomment]
   19 | ⠱⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠊⠀⠀⠀⡞⠀⠀⠀⠀⢸⣿⣷⣿⣿⣿    /*"kawaiiiiiii!!!!!!!!!!!"*\
      |                                    
tarifa.cpp:38:1: warning: "/*" within comment [-Wcomment]
   38 | /* writer  : chainsa_min *\
      |  
tarifa.cpp:151:1: warning: multi-line comment [-Wcomment]
  151 | // for 2 pointer l = 0 r= n-1 \
      | ^
tarifa.cpp: In function 'int main()':
tarifa.cpp:95:33: warning: unused variable 'j' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                 ^
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:49: warning: unused variable 'sums' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                 ^~~~
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:60: warning: unused variable 'b' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                            ^
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:63: warning: unused variable 'c' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                               ^
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:65: warning: unused variable 'd' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                 ^
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:69: warning: unused variable 'val_stor' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                     ^~~~~~~~
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:80: warning: unused variable 'val_stor1' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                ^~~~~~~~~
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:92: warning: unused variable 'val_stro2' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                            ^~~~~~~~~
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:104: warning: unused variable 'val_stor3' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                                        ^~~~~~~~~
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:116: warning: unused variable 'count_kor' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                                                    ^~~~~~~~~
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:132: warning: unused variable 'k' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                                                                    ^
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:136: warning: unused variable 'sum' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                                                                        ^~~
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:146: warning: unused variable 'x' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                                                                                  ^
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:150: warning: unused variable 'y' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                                                                                      ^
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:153: warning: unused variable 'z' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                                                                                         ^
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:95:157: warning: unused variable 'count_kor_1' [-Wunused-variable]
   95 | #define ash                  ll j ,  i,  n , m ,sums , a , b, c,d,  val_stor , val_stor1 , val_stro2 , val_stor3 , count_kor = 0 , k , sum = 0 , x , y, z , count_kor_1 = 0
      |                                                                                                                                                             ^~~~~~~~~~~
tarifa.cpp:184:2: note: in expansion of macro 'ash'
  184 |  ash;
      |  ^~~
tarifa.cpp:176:7: warning: unused variable 'flag' [-Wunused-variable]
  176 |  bool flag = 0 ; // true
      |       ^~~~
tarifa.cpp:105:34: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  105 | #define kyouka_chan       freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
      |                           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
tarifa.cpp:178:6: note: in expansion of macro 'kyouka_chan'
  178 |      kyouka_chan ;
      |      ^~~~~~~~~~~
tarifa.cpp:105:67: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  105 | #define kyouka_chan       freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
      |                                                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
tarifa.cpp:178:6: note: in expansion of macro 'kyouka_chan'
  178 |      kyouka_chan ;
      |      ^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...