Submission #589656

# Submission time Handle Problem Language Result Execution time Memory
589656 2022-07-05T05:25:52 Z Red_Inside Super Dango Maker (JOI22_dango3) C++17
0 / 100
8 ms 596 KB
#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>

namespace {

int variable_example = 1;

}  // namespace

void Solve(int n, int m)
{
	vector <int> use;
	forn(1, i, n*m)
	{
		use.pb(i);
	}
	forn(1, iter, m)
	{
		int l = 0;
		vector <int> que, fin;
		forn(1, i, n)
		{
			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;
				}
			}
			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;
		}
		Answer(fin);
	}
}

Compilation message

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)
......
   75 |    FOR(l + 1, j, use.size()) nw.pb(use[j]);
      |               ~~~~~~~~~~~~~            
dango3.cpp:75:4: note: in expansion of macro 'FOR'
   75 |    FOR(l + 1, j, use.size()) nw.pb(use[j]);
      |    ^~~
dango3.cpp: At global scope:
dango3.cpp:36:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   36 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Wrong Answer [7]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 316 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 468 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 596 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -