QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#111970 | #1861. Nondeterministic Finite Automaton | Crysfly | WA | 2ms | 3460kb | C++17 | 1.1kb | 2023-06-09 11:41:41 | 2023-06-09 11:41:43 |
Judging History
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