QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#111970#1861. Nondeterministic Finite AutomatonCrysflyWA 2ms3460kbC++171.1kb2023-06-09 11:41:412023-06-09 11:41:43

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-09 11:41:43]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3460kb
  • [2023-06-09 11:41:41]
  • 提交

answer

#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define int long long
using namespace std;
inline int read()
{
	char c=getchar();int x=0;bool f=0;
	for(;!isdigit(c);c=getchar())f^=!(c^45);
	for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
	if(f)x=-x;return x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 600005
#define inf 0x3f3f3f3f

vi F;
vector<pii>res[2];
void add(int u,int v,int w){
	res[w].pb(mkp(u,v));
}

void work6(){
	F={0,1,2,3,4,5};
	add(0,1,0),add(0,1,1);
	add(1,0,1);
	
	add(1,2,0);
	add(2,3,0);
	add(3,4,0);
	add(4,5,0);
	add(5,1,0);
	
	add(3,3,1);
	add(4,4,1);
	add(5,5,1);
	
	For(i,3,5) add(0,i,1),add(0,i,0);
}

void work(){
	
}

signed main()
{
	int n=read();
	if(n==6)work6();
	else work();
	For(c,0,1){
		cout<<res[c].size()<<"\n";
		for(auto it:res[c])cout<<it.fi<<" "<<it.se<<"\n";
	}
	cout<<F.size()<<"\n";
	for(int x:F)cout<<x<<' ';
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 3284kb

input:

6

output:

9
0 1
1 2
2 3
3 4
4 5
5 1
0 3
0 4
0 5
8
0 1
1 0
3 3
4 4
5 5
0 3
0 4
0 5
6
0 1 2 3 4 5 

result:

ok n = 6

Test #2:

score: -100
Wrong Answer
time: 2ms
memory: 3460kb

input:

20

output:

0
0
0

result:

wrong answer n = 20, l = 0 is to small