제출 #1023671

#제출 시각아이디문제언어결과실행 시간메모리
1023671vjudge1Knapsack (NOI18_knapsack)C++98
0 / 100
0 ms348 KiB
#include <iostream> #include <cmath> #include <vector> #include <string> #include <algorithm> #include <set> #include <map> #include <deque> using namespace std; #define int long long #define ff first #define ss second int mod = 1e9 + 7; signed main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n , w; cin >> w >> n; int a[n] , b[n] , c[n]; for(int i = 0; i < n; i++){ cin >> a[i] >> b[i] >> c[i]; } if(b[0] <= w and c[0] != 0){ cout << a[0]; }else{ cout << 0; } return 0; } //AZIM_BEST
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...