QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#143391#6706. Sekiroqzez#AC ✓1ms3724kbC++14754b2023-08-21 10:42:032023-08-21 10:42:06

Judging History

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

  • [2023-08-21 10:42:06]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3724kb
  • [2023-08-21 10:42:03]
  • 提交

answer

#include<bits/stdc++.h>
#define Gc() getchar() 
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;using LL=__int128;
const int N=1e3+5,M=N*4+5,K=31650,mod=998244353,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(time(0));
int n,k;
void Solve(){
	int i,j;scanf("%d%d",&n,&k);
	while(k--&&n>1){
		n=(n+1)/2;
	}
	printf("%d\n",n);
}
int main(){
	int t;scanf("%d",&t);while(t--) Solve();
}

这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3724kb

input:

4
10 1
7 1
10 2
7 2

output:

5
4
3
2

result:

ok 4 number(s): "5 4 3 2"

Test #2:

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

input:

1000
442956297 12
982332962 27
497083098 816382285
396247623 24
898041447 407271792
763055147 14
352462601 16
519828345 6
219558285 10
325702476 354976208
490357788 107179876
390383594 636902929
169308923 21552242
657869544 9
435305129 833496936
300697250 24
320657401 4
896954688 877519779
679896094...

output:

108144
8
1
24
1
46574
5379
8122318
214413
1
1
1
1
1284902
1
18
20041088
1
21246753
5480
553
226
3877013
3162838
1
1
0
330619747
1168178
1
10463
1
2
0
1
0
1
1
91795
22918685
0
364
26026
66
1
4
15291
1
1
10
0
35435061
1
1
13899
1
6616
1
117
1
30576
1
1
101267710
1
1
4428
1
37192038
620
1
0
11
3551
1
4...

result:

ok 1000 numbers