Submission #752098

#TimeUsernameProblemLanguageResultExecution timeMemory
752098minhcoolParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define ll long long #define fi first #define se second #define pb push_back #define mp make_pair typedef pair<int, int> ii; typedef pair<ii, int> iii; typedef pair<ii, ii> iiii; const int N = 3e5 + 5; const int oo = 1e18 + 7, mod = 1e9 + 7; mt19937 rng(1); int rnd(int l, int r){ int temp = rng() % (r - l + 1); return abs(temp) + l; } void encode(int N, int M[]){ for(int i = 0; i < N; i++){ for(int j = 0; j < 8; j++){ if(M[i] & (1 << j)){ send(8 * i + j); } } } }
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define ll long long #define fi first #define se second #define pb push_back #define mp make_pair typedef pair<int, int> ii; typedef pair<ii, int> iii; typedef pair<ii, ii> iiii; const int N = 3e5 + 5; const int oo = 1e18 + 7, mod = 1e9 + 7; mt19937 rng(1); int rnd(int l, int r){ int temp = rng() % (r - l + 1); return abs(temp) + l; } void decode(int N, int L, int X[]){ vector<int> ans(N); for(int i = 0; i < L; i++){ int pos = X[i]/8, pos2 = X[i]%8; ans[pos] += (1 << pos2); } for(int i = 0; i < N; i++) output(ans[i]); }

Compilation message (stderr)

encoder.cpp:20:21: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   20 | const int oo = 1e18 + 7, mod = 1e9 + 7;
      |                ~~~~~^~~

decoder.cpp:20:21: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   20 | const int oo = 1e18 + 7, mod = 1e9 + 7;
      |                ~~~~~^~~
decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:35:29: error: 'output' was not declared in this scope
   35 |  for(int i = 0; i < N; i++) output(ans[i]);
      |                             ^~~~~~