Submission #331882

#TimeUsernameProblemLanguageResultExecution timeMemory
331882achibasadzishviliParrots (IOI11_parrots)C++17
52 / 100
3 ms1340 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> #define ll long long #define f first #define s second #define pb push_back using namespace std; void encode(int n, int m[]){ for(int i=0; i<n; i++){ for(int j=0; j<=9; j++) if(m[i] & (1 << j)) send(10 * i + j); } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> #define ll long long #define f first #define s second #define pb push_back using namespace std; void decode(int n, int l, int x[]){ vector<ll>m; for(int i=0; i<n; i++) m.pb(0); for(int i=0; i<l; i++){ ll k = x[i]; ll ind = x[i] / 10; ll t = x[i] % 10; m[ind] |= 1 << t; } for(int i=0; i<n; i++) output(m[i]); }

Compilation message (stderr)

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:15:12: warning: unused variable 'k' [-Wunused-variable]
   15 |         ll k = x[i];
      |            ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...