Submission #500555

#TimeUsernameProblemLanguageResultExecution timeMemory
500555PoPularPlusPlusParrots (IOI11_parrots)C++17
81 / 100
3 ms1048 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define pb(e) push_back(e) #define sv(a) sort(a.begin(),a.end()) #define sa(a,n) sort(a,a+n) #define mp(a,b) make_pair(a,b) #define vf first #define vs second #define ar array #define all(x) x.begin(),x.end() const int inf = 0x3f3f3f3f; const int mod = 1000000007; const double PI=3.14159265358979323846264338327950288419716939937510582097494459230; bool remender(ll a , ll b){return a%b;} void encode(int n, int arr[]){ for(int i = 0; i < n; i++){ for(int j = 0; j < 8; j++){ if(((1 << j) & arr[i]) > 0){ send(i * 8 + j); } } } }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define pb(e) push_back(e) #define sv(a) sort(a.begin(),a.end()) #define sa(a,n) sort(a,a+n) #define mp(a,b) make_pair(a,b) #define vf first #define vs second #define ar array #define all(x) x.begin(),x.end() const int inf = 0x3f3f3f3f; const int mod = 1000000007; const double PI=3.14159265358979323846264338327950288419716939937510582097494459230; bool remender(ll a , ll b){return a%b;} void decode(int n, int l, int arr[]){ int ans[n]; memset(ans,0,sizeof ans); for(int i = 0; i < l; i++){ int pos = arr[i]/8; int bit = arr[i] % 8; ans[pos] += (1 << bit); } for(int i = 0; i < n; i++)output(ans[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...