Submission #1261114

#TimeUsernameProblemLanguageResultExecution timeMemory
1261114Zbyszek99Question (Grader is different from the original contest) (CEOI14_question_grader)C++20
100 / 100
742 ms39640 KiB
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long #define ld long double #define ull unsigned long long #define ff first #define ss second #define pii pair<int,int> #define pll pair<long long, long long> #define vi vector<int> #define vl vector<long long> #define pb push_back #define rep(i, b) for(int i = 0; i < (b); ++i) #define rep2(i,a,b) for(int i = a; i <= (b); ++i) #define rep3(i,a,b,c) for(int i = a; i <= (b); i+=c) #define count_bits(x) __builtin_popcountll((x)) #define all(x) (x).begin(),(x).end() #define siz(x) (int)(x).size() #define forall(it,x) for(auto& it:(x)) using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update> ordered_set; //mt19937 mt;void random_start(){mt.seed(chrono::time_point_cast<chrono::milliseconds>(chrono::high_resolution_clock::now()).time_since_epoch().count());} //ll los(ll a, ll b) {return a + (mt() % (b-a+1));} const int INF = 1e9+50; const ll INF_L = 1e18+40; const ll MOD = 1e9+7; int wybor[921]; int dupa() { int cur = 0; rep(mask,(1<<12)) { int cnt = 0; rep(i,12) { if(mask & (1 << i)) cnt++; } if(cnt == 6) wybor[cur++] = mask; } return 2137; } int xd = dupa(); int encode(int n, int x, int y) { rep(bit,12) { if((wybor[x]&(1<<bit)) == 0 && (wybor[y]&(1<<bit)) == (1 << bit)) { return bit+1; } } } int decode(int n, int x, int y) { y--; if(wybor[x]&(1<<y)) return 0; else return 1; }
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long #define ld long double #define ull unsigned long long #define ff first #define ss second #define pii pair<int,int> #define pll pair<long long, long long> #define vi vector<int> #define vl vector<long long> #define pb push_back #define rep(i, b) for(int i = 0; i < (b); ++i) #define rep2(i,a,b) for(int i = a; i <= (b); ++i) #define rep3(i,a,b,c) for(int i = a; i <= (b); i+=c) #define count_bits(x) __builtin_popcountll((x)) #define all(x) (x).begin(),(x).end() #define siz(x) (int)(x).size() #define forall(it,x) for(auto& it:(x)) using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update> ordered_set; //mt19937 mt;void random_start(){mt.seed(chrono::time_point_cast<chrono::milliseconds>(chrono::high_resolution_clock::now()).time_since_epoch().count());} //ll los(ll a, ll b) {return a + (mt() % (b-a+1));} const int INF = 1e9+50; const ll INF_L = 1e18+40; const ll MOD = 1e9+7; int wybor[921]; int dupa() { int cur = 0; rep(mask,(1<<12)) { int cnt = 0; rep(i,12) { if(mask & (1 << i)) cnt++; } if(cnt == 6) wybor[cur++] = mask; } return 2137; } int xd = dupa(); int encode(int n, int x, int y) { rep(bit,12) { if((wybor[x]&(1<<bit)) == 0 && (wybor[y]&(1<<bit)) == (1 << bit)) { return bit+1; } } } int decode(int n, int x, int y) { y--; if(wybor[x]&(1<<y)) return 0; else return 1; }

Compilation message (stderr)

# 1번째 컴파일 단계

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:58:1: warning: control reaches end of non-void function [-Wreturn-type]
   58 | }
      | ^

# 2번째 컴파일 단계

decoder.cpp: In function 'int encode(int, int, int)':
decoder.cpp:58:1: warning: control reaches end of non-void function [-Wreturn-type]
   58 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...