QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#871569 | #8623. Meta | ucup-team139# | WA | 1ms | 3584kb | C++14 | 430b | 2025-01-25 21:10:53 | 2025-01-25 21:10:54 |
Judging History
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'