QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#135492#5176. 多控制反转1kri0 1ms3548kbC++14753b2023-08-05 16:20:002023-08-05 16:20:03

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-05 16:20:03]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3548kb
  • [2023-08-05 16:20:00]
  • 提交

answer

#include <iostream>
#include <cstdio>
using namespace std;
int n,m,q,sub_id;
int tot,sta[1000005][4];
void add(int a,int b,int c,int d){
	++tot;
	sta[tot][0]=a,sta[tot][1]=b,sta[tot][2]=c,sta[tot][3]=d;
	return;
}
int main(){
	cin>>n>>m>>q>>sub_id;
	if (n==0){
		cout<<1<<endl;
		cout<<"1 0"<<endl;
		return 0;
	}
	if (n==1){
		cout<<1<<endl;
		cout<<"2 0 1"<<endl;
		return 0;
	}
	if (n==2){
		cout<<1<<endl;
		cout<<"3 0 1 2"<<endl;
		return 0;
	}
	add(3,0,1,n+1);
	int o=n+1;
	for (int i=2;i<n-1;i++){
		add(3,i,o,2*n+3-o);
		o=2*n+3-o;
	}
	add(3,o,n-1,n);
	cout<<tot<<endl;
	for (int i=1;i<=tot;i++){
		cout<<sta[i][0]<<' ';
		for (int j=1;j<=sta[i][0];j++)cout<<sta[i][j]<<' ';
		cout<<endl;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 15
Accepted
time: 0ms
memory: 3432kb

input:

0 2 1 1

output:

1
1 0

result:

ok OK.

Test #2:

score: -15
Wrong Answer
time: 1ms
memory: 3428kb

input:

13 28 105 1

output:

12
3 0 1 14 
3 2 14 15 
3 3 15 14 
3 4 14 15 
3 5 15 14 
3 6 14 15 
3 7 15 14 
3 8 14 15 
3 9 15 14 
3 10 14 15 
3 11 15 14 
3 14 12 13 

result:

wrong answer Wrong solution.

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Wrong Answer

Test #13:

score: 10
Accepted
time: 0ms
memory: 3400kb

input:

0 2 1 4

output:

1
1 0

result:

ok OK.

Test #14:

score: -10
Wrong Answer
time: 1ms
memory: 3548kb

input:

18 20 325 4

output:

17
3 0 1 19 
3 2 19 20 
3 3 20 19 
3 4 19 20 
3 5 20 19 
3 6 19 20 
3 7 20 19 
3 8 19 20 
3 9 20 19 
3 10 19 20 
3 11 20 19 
3 12 19 20 
3 13 20 19 
3 14 19 20 
3 15 20 19 
3 16 19 20 
3 20 17 18 

result:

wrong answer Integer 20 violates the range [0, 19]

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Wrong Answer

Test #20:

score: 0
Wrong Answer
time: 1ms
memory: 3472kb

input:

14 16 393 6

output:

13
3 0 1 15 
3 2 15 16 
3 3 16 15 
3 4 15 16 
3 5 16 15 
3 6 15 16 
3 7 16 15 
3 8 15 16 
3 9 16 15 
3 10 15 16 
3 11 16 15 
3 12 15 16 
3 16 13 14 

result:

wrong answer Integer 16 violates the range [0, 15]

Subtask #7:

score: 0
Skipped

Dependency #2:

0%

Subtask #8:

score: 0
Skipped

Dependency #3:

0%