Submission #289766

# Submission time Handle Problem Language Result Execution time Memory
289766 2020-09-03T03:38:28 Z dvdg6566 Vision Program (IOI19_vision) C++14
Compilation error
0 ms 0 KB
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pi;
typedef vector<int> vi;
typedef vector<pi> vpi;
#define pb emplace_back
#define mp make_pair
#define f first
#define s second
#define SZ(x) (int)x.size()
#define ALL(x) x.begin(),x.end()
#define lb lower_bound
const int MAXN=151000;
const ll MOD=998244353;

vi tm;

void construct_network(int H, int W, int K) {
	int cur=H*W;
	for(int i=0;i<H;++i)for(int j=0;j<H;++j){
		for(int k=0;k<W;++k)for(int l=0;l<W;++l){
			if(abs(i-j) + abs(k-l) != K)continue;
			vi X;
			X.pb(i*W+k);
			X.pb(j*W+l);
			// for(auto i:X)cerr<<i<<' ';cerr<<'\n';
			add_and(X);
			// cerr<<"Ok\n";
			tm.pb(cur);++cur;
		}
	}
	// for(auto t:tm)cerr<<t<<' ';cerr<<'\n';
	add_or(tm);
	return;
}

Compilation message

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:31:4: error: reference to 'tm' is ambiguous
   31 |    tm.pb(cur);++cur;
      |    ^~
In file included from /usr/include/pthread.h:24,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h:148,
                 from /usr/include/c++/9/ext/atomicity.h:35,
                 from /usr/include/c++/9/bits/basic_string.h:39,
                 from /usr/include/c++/9/string:55,
                 from vision.h:6,
                 from vision.cpp:1:
/usr/include/time.h:133:8: note: candidates are: 'struct tm'
  133 | struct tm
      |        ^~
vision.cpp:18:4: note:                 'vi tm'
   18 | vi tm;
      |    ^~
vision.cpp:35:9: error: reference to 'tm' is ambiguous
   35 |  add_or(tm);
      |         ^~
In file included from /usr/include/pthread.h:24,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h:148,
                 from /usr/include/c++/9/ext/atomicity.h:35,
                 from /usr/include/c++/9/bits/basic_string.h:39,
                 from /usr/include/c++/9/string:55,
                 from vision.h:6,
                 from vision.cpp:1:
/usr/include/time.h:133:8: note: candidates are: 'struct tm'
  133 | struct tm
      |        ^~
vision.cpp:18:4: note:                 'vi tm'
   18 | vi tm;
      |    ^~