QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#93997#5255. Greedy DrawersjakerAC ✓2ms3792kbC++14852b2023-04-04 18:47:152023-04-04 18:47:17

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-04 18:47:17]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3792kb
  • [2023-04-04 18:47:15]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,k) for(int i = j;i <= k;++i)
#define repp(i,j,k) for(int i = j;i >= k;--i)
#define ll long long
#define pb push_back
#define mp make_pair
#define fr first
#define se second
#define P pair<int,int>
int rd() {
	int x; scanf("%d",&x);
	return x;
}
int n;
P ans1[300],ans2[300];
int main() {
	n = rd();
	int y = n,x = 1; 
	rep(i,1,n/7) {
		int st = 7*(i-1);
		rep(k,1,3) ans1[st+k] = mp(x,y) , ans2[st+k] = mp(x,y);
		x++; y--; 
		ans1[st+4] = mp(x,y); ans2[st+4] = mp(x,y+1);
		x++;y--;
		rep(k,5,7) ans1[st+k] = mp(x,y) , ans2[st+k] = mp(x,y+(int)(k==5));
		x++;y--;
	}
	rep(i,n/7*7+1,n) ans1[i] = mp(x,y) , ans2[i] = mp(x,y);
	rep(i,1,n) printf("%d %d\n",ans1[i].fr,ans1[i].se); printf("\n");
	rep(i,1,n) printf("%d %d\n",ans2[i].fr,ans2[i].se);
	return 0;
}

詳細信息

Test #1:

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

input:

150

output:

1 150
1 150
1 150
2 149
3 148
3 148
3 148
4 147
4 147
4 147
5 146
6 145
6 145
6 145
7 144
7 144
7 144
8 143
9 142
9 142
9 142
10 141
10 141
10 141
11 140
12 139
12 139
12 139
13 138
13 138
13 138
14 137
15 136
15 136
15 136
16 135
16 135
16 135
17 134
18 133
18 133
18 133
19 132
19 132
19 132
20 131...

result:

ok you killed Janko's strategy

Test #2:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

151

output:

1 151
1 151
1 151
2 150
3 149
3 149
3 149
4 148
4 148
4 148
5 147
6 146
6 146
6 146
7 145
7 145
7 145
8 144
9 143
9 143
9 143
10 142
10 142
10 142
11 141
12 140
12 140
12 140
13 139
13 139
13 139
14 138
15 137
15 137
15 137
16 136
16 136
16 136
17 135
18 134
18 134
18 134
19 133
19 133
19 133
20 132...

result:

ok you killed Janko's strategy

Test #3:

score: 0
Accepted
time: 1ms
memory: 3764kb

input:

152

output:

1 152
1 152
1 152
2 151
3 150
3 150
3 150
4 149
4 149
4 149
5 148
6 147
6 147
6 147
7 146
7 146
7 146
8 145
9 144
9 144
9 144
10 143
10 143
10 143
11 142
12 141
12 141
12 141
13 140
13 140
13 140
14 139
15 138
15 138
15 138
16 137
16 137
16 137
17 136
18 135
18 135
18 135
19 134
19 134
19 134
20 133...

result:

ok you killed Janko's strategy

Test #4:

score: 0
Accepted
time: 2ms
memory: 3500kb

input:

153

output:

1 153
1 153
1 153
2 152
3 151
3 151
3 151
4 150
4 150
4 150
5 149
6 148
6 148
6 148
7 147
7 147
7 147
8 146
9 145
9 145
9 145
10 144
10 144
10 144
11 143
12 142
12 142
12 142
13 141
13 141
13 141
14 140
15 139
15 139
15 139
16 138
16 138
16 138
17 137
18 136
18 136
18 136
19 135
19 135
19 135
20 134...

result:

ok you killed Janko's strategy

Test #5:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

154

output:

1 154
1 154
1 154
2 153
3 152
3 152
3 152
4 151
4 151
4 151
5 150
6 149
6 149
6 149
7 148
7 148
7 148
8 147
9 146
9 146
9 146
10 145
10 145
10 145
11 144
12 143
12 143
12 143
13 142
13 142
13 142
14 141
15 140
15 140
15 140
16 139
16 139
16 139
17 138
18 137
18 137
18 137
19 136
19 136
19 136
20 135...

result:

ok you killed Janko's strategy

Test #6:

score: 0
Accepted
time: 2ms
memory: 3500kb

input:

155

output:

1 155
1 155
1 155
2 154
3 153
3 153
3 153
4 152
4 152
4 152
5 151
6 150
6 150
6 150
7 149
7 149
7 149
8 148
9 147
9 147
9 147
10 146
10 146
10 146
11 145
12 144
12 144
12 144
13 143
13 143
13 143
14 142
15 141
15 141
15 141
16 140
16 140
16 140
17 139
18 138
18 138
18 138
19 137
19 137
19 137
20 136...

result:

ok you killed Janko's strategy

Test #7:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

156

output:

1 156
1 156
1 156
2 155
3 154
3 154
3 154
4 153
4 153
4 153
5 152
6 151
6 151
6 151
7 150
7 150
7 150
8 149
9 148
9 148
9 148
10 147
10 147
10 147
11 146
12 145
12 145
12 145
13 144
13 144
13 144
14 143
15 142
15 142
15 142
16 141
16 141
16 141
17 140
18 139
18 139
18 139
19 138
19 138
19 138
20 137...

result:

ok you killed Janko's strategy

Test #8:

score: 0
Accepted
time: 2ms
memory: 3760kb

input:

157

output:

1 157
1 157
1 157
2 156
3 155
3 155
3 155
4 154
4 154
4 154
5 153
6 152
6 152
6 152
7 151
7 151
7 151
8 150
9 149
9 149
9 149
10 148
10 148
10 148
11 147
12 146
12 146
12 146
13 145
13 145
13 145
14 144
15 143
15 143
15 143
16 142
16 142
16 142
17 141
18 140
18 140
18 140
19 139
19 139
19 139
20 138...

result:

ok you killed Janko's strategy

Test #9:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

158

output:

1 158
1 158
1 158
2 157
3 156
3 156
3 156
4 155
4 155
4 155
5 154
6 153
6 153
6 153
7 152
7 152
7 152
8 151
9 150
9 150
9 150
10 149
10 149
10 149
11 148
12 147
12 147
12 147
13 146
13 146
13 146
14 145
15 144
15 144
15 144
16 143
16 143
16 143
17 142
18 141
18 141
18 141
19 140
19 140
19 140
20 139...

result:

ok you killed Janko's strategy

Test #10:

score: 0
Accepted
time: 2ms
memory: 3600kb

input:

159

output:

1 159
1 159
1 159
2 158
3 157
3 157
3 157
4 156
4 156
4 156
5 155
6 154
6 154
6 154
7 153
7 153
7 153
8 152
9 151
9 151
9 151
10 150
10 150
10 150
11 149
12 148
12 148
12 148
13 147
13 147
13 147
14 146
15 145
15 145
15 145
16 144
16 144
16 144
17 143
18 142
18 142
18 142
19 141
19 141
19 141
20 140...

result:

ok you killed Janko's strategy

Test #11:

score: 0
Accepted
time: 2ms
memory: 3556kb

input:

160

output:

1 160
1 160
1 160
2 159
3 158
3 158
3 158
4 157
4 157
4 157
5 156
6 155
6 155
6 155
7 154
7 154
7 154
8 153
9 152
9 152
9 152
10 151
10 151
10 151
11 150
12 149
12 149
12 149
13 148
13 148
13 148
14 147
15 146
15 146
15 146
16 145
16 145
16 145
17 144
18 143
18 143
18 143
19 142
19 142
19 142
20 141...

result:

ok you killed Janko's strategy

Test #12:

score: 0
Accepted
time: 2ms
memory: 3552kb

input:

161

output:

1 161
1 161
1 161
2 160
3 159
3 159
3 159
4 158
4 158
4 158
5 157
6 156
6 156
6 156
7 155
7 155
7 155
8 154
9 153
9 153
9 153
10 152
10 152
10 152
11 151
12 150
12 150
12 150
13 149
13 149
13 149
14 148
15 147
15 147
15 147
16 146
16 146
16 146
17 145
18 144
18 144
18 144
19 143
19 143
19 143
20 142...

result:

ok you killed Janko's strategy

Test #13:

score: 0
Accepted
time: 2ms
memory: 3716kb

input:

162

output:

1 162
1 162
1 162
2 161
3 160
3 160
3 160
4 159
4 159
4 159
5 158
6 157
6 157
6 157
7 156
7 156
7 156
8 155
9 154
9 154
9 154
10 153
10 153
10 153
11 152
12 151
12 151
12 151
13 150
13 150
13 150
14 149
15 148
15 148
15 148
16 147
16 147
16 147
17 146
18 145
18 145
18 145
19 144
19 144
19 144
20 143...

result:

ok you killed Janko's strategy

Test #14:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

163

output:

1 163
1 163
1 163
2 162
3 161
3 161
3 161
4 160
4 160
4 160
5 159
6 158
6 158
6 158
7 157
7 157
7 157
8 156
9 155
9 155
9 155
10 154
10 154
10 154
11 153
12 152
12 152
12 152
13 151
13 151
13 151
14 150
15 149
15 149
15 149
16 148
16 148
16 148
17 147
18 146
18 146
18 146
19 145
19 145
19 145
20 144...

result:

ok you killed Janko's strategy

Test #15:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

164

output:

1 164
1 164
1 164
2 163
3 162
3 162
3 162
4 161
4 161
4 161
5 160
6 159
6 159
6 159
7 158
7 158
7 158
8 157
9 156
9 156
9 156
10 155
10 155
10 155
11 154
12 153
12 153
12 153
13 152
13 152
13 152
14 151
15 150
15 150
15 150
16 149
16 149
16 149
17 148
18 147
18 147
18 147
19 146
19 146
19 146
20 145...

result:

ok you killed Janko's strategy

Test #16:

score: 0
Accepted
time: 2ms
memory: 3756kb

input:

165

output:

1 165
1 165
1 165
2 164
3 163
3 163
3 163
4 162
4 162
4 162
5 161
6 160
6 160
6 160
7 159
7 159
7 159
8 158
9 157
9 157
9 157
10 156
10 156
10 156
11 155
12 154
12 154
12 154
13 153
13 153
13 153
14 152
15 151
15 151
15 151
16 150
16 150
16 150
17 149
18 148
18 148
18 148
19 147
19 147
19 147
20 146...

result:

ok you killed Janko's strategy

Test #17:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

166

output:

1 166
1 166
1 166
2 165
3 164
3 164
3 164
4 163
4 163
4 163
5 162
6 161
6 161
6 161
7 160
7 160
7 160
8 159
9 158
9 158
9 158
10 157
10 157
10 157
11 156
12 155
12 155
12 155
13 154
13 154
13 154
14 153
15 152
15 152
15 152
16 151
16 151
16 151
17 150
18 149
18 149
18 149
19 148
19 148
19 148
20 147...

result:

ok you killed Janko's strategy

Test #18:

score: 0
Accepted
time: 2ms
memory: 3632kb

input:

167

output:

1 167
1 167
1 167
2 166
3 165
3 165
3 165
4 164
4 164
4 164
5 163
6 162
6 162
6 162
7 161
7 161
7 161
8 160
9 159
9 159
9 159
10 158
10 158
10 158
11 157
12 156
12 156
12 156
13 155
13 155
13 155
14 154
15 153
15 153
15 153
16 152
16 152
16 152
17 151
18 150
18 150
18 150
19 149
19 149
19 149
20 148...

result:

ok you killed Janko's strategy

Test #19:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

168

output:

1 168
1 168
1 168
2 167
3 166
3 166
3 166
4 165
4 165
4 165
5 164
6 163
6 163
6 163
7 162
7 162
7 162
8 161
9 160
9 160
9 160
10 159
10 159
10 159
11 158
12 157
12 157
12 157
13 156
13 156
13 156
14 155
15 154
15 154
15 154
16 153
16 153
16 153
17 152
18 151
18 151
18 151
19 150
19 150
19 150
20 149...

result:

ok you killed Janko's strategy

Test #20:

score: 0
Accepted
time: 2ms
memory: 3620kb

input:

250

output:

1 250
1 250
1 250
2 249
3 248
3 248
3 248
4 247
4 247
4 247
5 246
6 245
6 245
6 245
7 244
7 244
7 244
8 243
9 242
9 242
9 242
10 241
10 241
10 241
11 240
12 239
12 239
12 239
13 238
13 238
13 238
14 237
15 236
15 236
15 236
16 235
16 235
16 235
17 234
18 233
18 233
18 233
19 232
19 232
19 232
20 231...

result:

ok you killed Janko's strategy