QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#712185#9546. Recover Statisticshnust_100team#AC ✓0ms3784kbC++17532b2024-11-05 14:51:042024-11-05 14:51:04

Judging History

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

  • [2024-11-05 14:51:04]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3784kb
  • [2024-11-05 14:51:04]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
void solve(){
	int n=100,a,b,c;
	cin>>a>>b>>c;
	vector<int>ans(101);
	int cnt=100;
	for(int i=n;i>=1;i--){
		if(cnt>99){
			ans[i]=c+1;
		}else if(cnt>95){
			ans[i]=b+1;
		}else if(cnt>50){
			ans[i]=a+1;
		}else{
			ans[i]=a;
		}
		cnt--;
	}
	cout<<n<<"\n";
	for(int i=1;i<=n;i++){
		cout<<ans[i]<<" ";
	}return;
}
signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	int t=1;
	//cin>>t;
	while(t--){
		solve();
	}
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3784kb

input:

50
95
99

output:

100
50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 96 96 96 96...

result:

ok ok

Test #2:

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

input:

1
2
3

output:

100
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 4 

result:

ok ok

Test #3:

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

input:

1
999999998
999999999

output:

100
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 999999999 999999999 999999999 999999999 1000000000 

result:

ok ok

Test #4:

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

input:

999999997
999999998
999999999

output:

100
999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999997 999999...

result:

ok ok

Test #5:

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

input:

893
114514
1919810

output:

100
893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 893 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 894 ...

result:

ok ok

Extra Test:

score: 0
Extra Test Passed