QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#207313#6773. True Storyveg#WA 26ms4640kbC++23520b2023-10-08 13:46:292023-10-08 13:46:29

Judging History

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

  • [2023-10-08 13:46:29]
  • 评测
  • 测评结果:WA
  • 用时:26ms
  • 内存:4640kb
  • [2023-10-08 13:46:29]
  • 提交

answer

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

bool cmp(int i,int j) {
	return i>j;
}
const int N=1e6+5;
int n,k,x,p[N],t[N],s[N];
int main() {
	scanf("%d%d%d%d",&n,&k,&x,&p[0]);
	for(int i=1;i<=n;++i) {
		scanf("%d",&s[i]);
	}
	sort(s+1,s+n+1,cmp);
	for(int i=1;i<=k;++i) {
		scanf("%d",&t[k]);
	}
	for(int i=1;i<=k;++i) {
		scanf("%d",&p[i]);
	}
	int r=0;
	for(int i=0;i<=k;++i) {
		if(r==n) break;
		while(r+1<=n&&1ll*s[r+1]*(p[i]-t[i])>=x) {
			++r;
		}
	}
	printf("%d\n",r);
	return 0;
}

详细

Test #1:

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

input:

4 3 10 4
1 5 2 1
3 4 5
7 9 10

output:

2

result:

ok single line: '2'

Test #2:

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

input:

1 3 10 3
1
2 3 4
5 8 10

output:

0

result:

ok single line: '0'

Test #3:

score: 0
Accepted
time: 25ms
memory: 4636kb

input:

100000 100000 544857367 2
45337851 26009328 15109007 11351428 108994261 7849241 17594424 49523907 45417024 54467076 60475979 54550753 30367925 22635509 272520858 49488818 90740887 32100499 21719978 20217697 22756760 32141867 23665455 90791528 30224242 21821163 23727178 13022129 30321908 21859760 341...

output:

100000

result:

ok single line: '100000'

Test #4:

score: 0
Accepted
time: 26ms
memory: 4396kb

input:

100000 100000 952144339 3
55978491 28891209 30764133 73202535 10363511 26399650 73193857 11050595 50138706 35213415 158763870 45394118 29711543 27226014 18347560 47615161 52942830 45283718 45268901 79349900 12634867 21153206 19438268 38106844 52860935 25132415 68017329 33907567 23855866 21625728 433...

output:

100000

result:

ok single line: '100000'

Test #5:

score: -100
Wrong Answer
time: 18ms
memory: 4640kb

input:

100000 100000 861312012 213
2930319 4924031 22699434 5536443 8274332 18738805 6676085 8383208 57465745 4425773 18042887 7619913 3971674 6899778 4032324 14434558 45293265 6527910 11865850 8503737 6801962 9561267 19600731 39190716 10483549 6288014 7777162 14447687 4032050 2209849 10854895 6635250 1167...

output:

100000

result:

wrong answer 1st lines differ - expected: '99999', found: '100000'