Submission #605157

# Submission time Handle Problem Language Result Execution time Memory
605157 2022-07-25T13:30:51 Z Red_Inside ICC (CEOI16_icc) C++17
Compilation error
0 ms 0 KB
//
//#include <icc.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 all(v) v.begin(), v.end()
#define ld long double
#define ull unsigned long long

using namespace std;
const int maxn=2e6+100,LOG=17,mod=1e9+7;
int block = 226, 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=2e9;
#define y1 yy
#define prev pre
#define pii pair <int, int>

void run(int n)
{
	forn(1, iter, n-1)
	{
		vector <int> temp;
		forn(1, i, n)
		{
			temp.pb(i);
		}
		vector <vector <int> > sts;
		sts.pb(temp);
		int ret = 0;
		while(true)
		{
			vector <int> fi, se;
			for(auto i : sts)
			{
				FOR(0, j, i.size() / 2) fi.pb(i[j]);
				FOR(i.size() / 2, j, i.size()) se.pb(i[j]);
			}
			ret = query(fi.size(), se.size(), fi, se);
			if(ret == 0)
			{
				vector <vector <int> > nw;
				for(auto i : sts)
				{
					vector <int> V;
					FOR(0, j, i.size() / 2) V.pb(i[j]);
					nw.pb(V);
					V.clear();
					FOR(i.size() / 2, j, i.size()) V.pb(i[j]);
					nw.pb(V);
				}
				sts = nw;
			}
			else
			{
				break;
			}
		}
		while(sts.size() > 1)
		{
			vector <vector <int> > V;
			FOR(0, i, sts.size() / 2)
			{
				V.pb(sts[i]);
			}
			vector <int> fi, se;
			for(auto i : V)
			{
				FOR(0, j, i.size() / 2) fi.pb(i[j]);
				FOR(i.size() / 2, j, i.size()) se.pb(i[j]);
			}
			ret = query(fi.size(), se.size(), fi, se);
			if(ret == 0)
			{
				V.clear();
				FOR(sts.size() / 2, i, sts.size()) V.pb(sts[i]);
			}
			sts = V;
		}
		vector <int> fi, se;
		FOR(0, i, sts[0].size() / 2)
		{
			fi.pb(sts[0][i]);
		}
		FOR(sts[0].size() / 2, i, sts[0].size())
		{
			se.pb(sts[0][i]);
		}
		while(fi.size() >= 2 || se.size() >= 2)
		{
			vector <int> qf, qs;
			if(fi.size() < se.size()) swap(fi, se);
			FOR(0, i, fi.size() / 2)
			{
				qf.pb(fi[i]);
			}
			ret = query(qf.size(), se.size(), qf, se);
			if(ret == 0)
			{
				qf.clear();
				FOR(fi.size() / 2, i, fi.size())
				{
					qf.pb(fi[i]);
				}
			}
			fi = qf;
		}
		setRoad(fi[0], se[0]);
	}
}

Compilation message

icc.cpp: In function 'void run(int)':
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   49 |     FOR(0, j, i.size() / 2) fi.pb(i[j]);
      |            ~~~~~~~~~~~~~~~             
icc.cpp:49:5: note: in expansion of macro 'FOR'
   49 |     FOR(0, j, i.size() / 2) fi.pb(i[j]);
      |     ^~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   50 |     FOR(i.size() / 2, j, i.size()) se.pb(i[j]);
      |                       ~~~~~~~~~~~      
icc.cpp:50:5: note: in expansion of macro 'FOR'
   50 |     FOR(i.size() / 2, j, i.size()) se.pb(i[j]);
      |     ^~~
icc.cpp:52:10: error: 'query' was not declared in this scope
   52 |    ret = query(fi.size(), se.size(), fi, se);
      |          ^~~~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   59 |      FOR(0, j, i.size() / 2) V.pb(i[j]);
      |             ~~~~~~~~~~~~~~~            
icc.cpp:59:6: note: in expansion of macro 'FOR'
   59 |      FOR(0, j, i.size() / 2) V.pb(i[j]);
      |      ^~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   62 |      FOR(i.size() / 2, j, i.size()) V.pb(i[j]);
      |                        ~~~~~~~~~~~     
icc.cpp:62:6: note: in expansion of macro 'FOR'
   62 |      FOR(i.size() / 2, j, i.size()) V.pb(i[j]);
      |      ^~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   75 |    FOR(0, i, sts.size() / 2)
      |           ~~~~~~~~~~~~~~~~~            
icc.cpp:75:4: note: in expansion of macro 'FOR'
   75 |    FOR(0, i, sts.size() / 2)
      |    ^~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   82 |     FOR(0, j, i.size() / 2) fi.pb(i[j]);
      |            ~~~~~~~~~~~~~~~             
icc.cpp:82:5: note: in expansion of macro 'FOR'
   82 |     FOR(0, j, i.size() / 2) fi.pb(i[j]);
      |     ^~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   83 |     FOR(i.size() / 2, j, i.size()) se.pb(i[j]);
      |                       ~~~~~~~~~~~      
icc.cpp:83:5: note: in expansion of macro 'FOR'
   83 |     FOR(i.size() / 2, j, i.size()) se.pb(i[j]);
      |     ^~~
icc.cpp:85:10: error: 'query' was not declared in this scope
   85 |    ret = query(fi.size(), se.size(), fi, se);
      |          ^~~~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   89 |     FOR(sts.size() / 2, i, sts.size()) V.pb(sts[i]);
      |                         ~~~~~~~~~~~~~  
icc.cpp:89:5: note: in expansion of macro 'FOR'
   89 |     FOR(sts.size() / 2, i, sts.size()) V.pb(sts[i]);
      |     ^~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   94 |   FOR(0, i, sts[0].size() / 2)
      |          ~~~~~~~~~~~~~~~~~~~~          
icc.cpp:94:3: note: in expansion of macro 'FOR'
   94 |   FOR(0, i, sts[0].size() / 2)
      |   ^~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
   98 |   FOR(sts[0].size() / 2, i, sts[0].size())
      |                          ~~~~~~~~~~~~~~~~
icc.cpp:98:3: note: in expansion of macro 'FOR'
   98 |   FOR(sts[0].size() / 2, i, sts[0].size())
      |   ^~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
  106 |    FOR(0, i, fi.size() / 2)
      |           ~~~~~~~~~~~~~~~~             
icc.cpp:106:4: note: in expansion of macro 'FOR'
  106 |    FOR(0, i, fi.size() / 2)
      |    ^~~
icc.cpp:110:10: error: 'query' was not declared in this scope
  110 |    ret = query(qf.size(), se.size(), qf, se);
      |          ^~~~~
icc.cpp:11:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 | #define FOR(i, j, n) for(int j = i; j < n; ++j)
......
  114 |     FOR(fi.size() / 2, i, fi.size())
      |                        ~~~~~~~~~~~~    
icc.cpp:114:5: note: in expansion of macro 'FOR'
  114 |     FOR(fi.size() / 2, i, fi.size())
      |     ^~~
icc.cpp:121:3: error: 'setRoad' was not declared in this scope
  121 |   setRoad(fi[0], se[0]);
      |   ^~~~~~~