69012023-12-19 15:49:24999Programtermék verseny (70 pont)cpp17Wrong answer 51/7039ms5264 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n,k;cin>>n>>k;
	vector<int> v(n+1);
	for(int i = 1;i<=n;i++){
		cin>>v[i];
	}
	int arany=n/12,ezust=n/4,bronz=n/2,elottelevok=0;
	int i=1,ans1=0,ans2=0,ans3=0;
	while(i<=n){
		if(v[i]>v[k]){
			elottelevok++;
		}
		if(i>k){
			if(elottelevok<arany){
				ans1=i;
			}
			if(elottelevok<ezust){
				ans2=i;
			}
			if(elottelevok<bronz){
				ans3=i;
			}
		}
		i++;
	}
	cout<<ans1<<endl<<ans2<<endl<<ans3<<endl;
}
SubtaskSumTestVerdictTimeMemory
base51/70
1Accepted0/03ms1684 KiB
2Wrong answer0/03ms1844 KiB
3Accepted0/037ms3016 KiB
4Wrong answer0/33ms2444 KiB
5Wrong answer0/33ms2628 KiB
6Wrong answer0/33ms2832 KiB
7Wrong answer0/33ms3004 KiB
8Accepted3/33ms2932 KiB
9Wrong answer0/33ms2896 KiB
10Accepted3/33ms2992 KiB
11Accepted3/33ms3236 KiB
12Accepted3/33ms3348 KiB
13Accepted3/34ms3496 KiB
14Accepted4/44ms3584 KiB
15Accepted4/419ms4004 KiB
16Accepted4/423ms4220 KiB
17Accepted4/427ms4300 KiB
18Accepted4/46ms4032 KiB
19Accepted4/48ms4404 KiB
20Wrong answer0/413ms4316 KiB
21Accepted4/439ms5032 KiB
22Accepted4/437ms5264 KiB
23Accepted4/432ms4968 KiB