Submission #1140282

#TimeUsernameProblemLanguageResultExecution timeMemory
1140282leo_2727앵무새 (IOI11_parrots)C++20
0 / 100
1 ms840 KiB
#include "encoder.h" #include "encoderlib.h" #include <algorithm> #include <fstream> #include <vector> #include <queue> #include <stack> #include <iostream> #include <cmath> #include <queue> #include <set> #include <string> #include <cstring> #include <map> #include <unordered_map> #include <unordered_set> #define F first #define S second #define PB push_back using namespace std; const long long MOD=1e9+7, INF=1e18; const int INFI=1e9; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<pair<int, ii>> viii; typedef vector<vii> vvii; typedef vector<ll> vll; typedef vector<vll> vvll; void encode(int n, int m[]){ for(int i=0;i<n;i++){ int num=i; for(int j=0;j<8;j++){ for(int k=0;k<4;k++) if(1<<k & j) num |= 1<<(k+4); if(1<<j & m[i]) num |= 1<<7; send(num); } } }
#include "decoder.h" #include "decoderlib.h" #include <algorithm> #include <fstream> #include <vector> #include <queue> #include <stack> #include <iostream> #include <cmath> #include <queue> #include <set> #include <string> #include <cstring> #include <map> #include <unordered_map> #include <unordered_set> #define F first #define S second #define PB push_back using namespace std; const long long MOD=1e9+7, INF=1e18; const int INFI=1e9; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<pair<int, ii>> viii; typedef vector<vii> vvii; typedef vector<ll> vll; typedef vector<vll> vvll; void decode(int n, int l, int x[]){ vi ans(n, 0); for(int i=0;i<l;i++){ int pos=0, pos2=0; for(int j=0;j<4;j++) if(1<<j & x[i]) pos |= 1<<j; for(int j=0;j<3;j++) if(1<<(j+4) & x[i]) pos2 |= 1<<j; if(x[i] & 1<<7) ans[pos] |= 1<<pos2; } 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...