Submission #589662

#TimeUsernameProblemLanguageResultExecution timeMemory
589662Red_InsideSuper Dango Maker (JOI22_dango3)C++17
0 / 100
391 ms604 KiB
#include "dango3.h" // #include <bits/stdc++.h> #define ll long long #define f first #define s second #define pb push_back #define mp make_pair #define o cout<<"BUG"<<endl; #define FOR(i, j, n) for(int j = i; j < n; ++j) #define forn(i, j, n) for(int j = i; j <= n; ++j) #define nfor(i, j, n) for(int j = n; j >= i; --j) #define sortv(vv) sort(vv.begin(), vv.end()) #define all(v) v.begin(), v.end() #define ld long double #define ull unsigned long long using namespace std; const int maxn=1e6+100,LOG=17, mod=1e9+7; int block = 320, timer = 0; const ld EPS = 1e-18; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define bt(i) (1 << (i)) //#define int ll const int inf=1e9+10; #define y1 yy #define prev pre #define pii pair <int, int> void Solve(int n, int m) { vector <int> use; forn(1, i, n*m) { use.pb(i); } forn(1, iter, m) { vector <int> que, fin; forn(1, i, n) { int l = 0; int r = use.size(); while(r - l > 1) { int mid = (l + r) / 2; que.clear(); FOR(0, j, mid) { que.pb(use[j]); } for(auto j : fin) que.pb(j); if(Query(que) == 1) { r = mid; } else { l = mid; } } // cout << "binsearch " << l << endl; fin.pb(use[l]); vector <int> nw; FOR(0, j, l) nw.pb(use[j]); FOR(l + 1, j, use.size()) nw.pb(use[j]); use = nw; } // cout << "ANSWER "; // for(auto i : fin) cout << i << " "; // cout << endl; Answer(fin); } }

Compilation message (stderr)

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:12:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   71 |    FOR(l + 1, j, use.size()) nw.pb(use[j]);
      |               ~~~~~~~~~~~~~            
dango3.cpp:71:4: note: in expansion of macro 'FOR'
   71 |    FOR(l + 1, j, use.size()) nw.pb(use[j]);
      |    ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...