QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#604741#8934. Challenge NPCericmegalovaniaWA 15ms7508kbC++201.3kb2024-10-02 13:38:462024-10-02 13:38:46

Judging History

你现在查看的是最新测评结果

  • [2024-10-02 13:38:46]
  • 评测
  • 测评结果:WA
  • 用时:15ms
  • 内存:7508kb
  • [2024-10-02 13:38:46]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

//#define ONLINE
#ifndef ONLINE
char DEBUG_BUFFER[1000];
#define debug(...) {sprintf(DEBUG_BUFFER,##__VA_ARGS__);\
cerr<<"\033[1;36m"<<DEBUG_BUFFER<<"\033[0;2m"<<"\033[0m";}
#else
#define debug(...) ;
#endif

using LL=long long;
using PII=pair<int,int>;

#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()

#define FAST_IO {ios::sync_with_stdio(false);cin.tie(nullptr);}
inline int read(){static int x; cin>>x; return x;}
inline LL readLL(){static LL x; cin>>x; return x;}
mt19937_64 rng(chrono::system_clock::now().time_since_epoch().count());

#define N 1001
#define M 510
int id(int x,bool _){
	return x*2+2-_;
}
void solve(){
	read(); //trash
	stringstream ans;
	int cnt=0;
	for(int i=0;i<M;i++) for(int _=0;_<2;_++){
		int nw=_;
		for(int j=i-1;j>=0;j--){
			nw^=1;
			ans<<id(i,_)<<' '<<id(j,nw)<<"\n";
			cnt++;
		}
	}
	cout<<(M*2)<<" "<<cnt<<" 2\n";
	for(int i=0;i<M;i++) cout<<"1 2 ";
	cout<<"\n"<<ans.str();
}

int main(){
	FAST_IO;
	int T=1;
	while(T--) solve();
	return 0;
}

/* stuff you should look for
* int overflow, array bounds
* special cases (n=1?)
* do smth instead of nothing and stay organized
* WRITE STUFF DOWN
* DON'T GET STUCK ON ONE APPROACH
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 15ms
memory: 7508kb

input:

1

output:

1020 259590 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...

result:

wrong answer The graph is not correct