QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#871569#8623. Metaucup-team139#WA 1ms3584kbC++14430b2025-01-25 21:10:532025-01-25 21:10:54

Judging History

This is the latest submission verdict.

  • [2025-01-25 21:10:54]
  • Judged
  • Verdict: WA
  • Time: 1ms
  • Memory: 3584kb
  • [2025-01-25 21:10:53]
  • Submitted

answer

#include <bits/stdc++.h>

#define int int64_t
using namespace std;

signed main() {
	cin.tie(0);
	ios_base::sync_with_stdio(0);
	int n;
	cin>>n;
	vector<int> v;
	for(int i=0; i<n; ++i) {
		string s;
		int a,b,c;
		cin>>s>>a>>b>>c;
		if(a==-1)a=301;
		if(b==-1)b=301;
		if(c==-1)c=301;
		v.push_back(min({a,b,c}));
	}
	sort(v.begin(),v.end());
	int s=0;
	int i=0;
	while(i<n && s+v[i]<300) s+=v[i++];
	cout<<i<<endl;
	return 0;
}


Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

13
AplusB -1 20 -1
TheBestWife 80 90 60
Cardinality 40 50 30
3D 40 -1 70
EqualStrings 25 15 20
FastTreeQueries 120 -1 40
GeoSharding 25 20 30
HaveYouSeenThisSubarray 80 90 60
InteractiveCasino 50 20 30
JigsawPuzzle 40 50 80
Knapsack -1 40 200
LondonUnderground -1 200 40
Meta 5 7 10

output:

10

result:

ok 1 number(s): "10"

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3584kb

input:

10
a 30 30 50
b 30 30 50
c 30 30 50
d 30 30 50
e 30 30 50
f 30 30 50
g 30 30 50
h 30 30 50
i 30 30 50
j 30 30 50

output:

9

result:

wrong answer 1st numbers differ - expected: '10', found: '9'