Submission #1821368


Source Code Expand

Copy
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(X,Y) ((X)>(Y)?X=(Y),true:false)
#define chmax(X,Y) ((X)<(Y)?X=(Y),true:false)
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}

int main(){
	int n;
	cin>>n;
	vector<int> v(n);
	for(ll i = 0; i < n; i+=5){
		vector<int> q(n, 0);
		ll s = 0;
		for(ll j = 0, t = 1; j < 5 && i+j<n; j++,t*=5){
			q[i+j] = t;
			s += t*8;
		}
		cout"? ";
		rep(j, n) cout<<j<<" "; cout<<endl;
		ll r;
		cin>>r;
		r -= s;
		for(ll j = 0; j < 5 && i+j<n; j++){
			v[i+j] = r%5%2;
			r /= 5;
		}
	}
	rep(i, n) cout<<v[i]<<" "; cout<<endl;
	return 0;
}

Submission Info

Submission Time
Task E - Coin Authentication
User Lepton
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1584 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:52:7: error: expected ‘;’ before string constant
   cout"? ";
       ^