#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define db double
#define ull unsigned long long
#define pb push_back
#define inf 1000000000000000000
#define linf 1000000000
#define mpr make_pair
#define in insert
#define pii pair<int,int>
#define pll pair<ll,ll>
#define f first
#define s second
//author :: E.Mustafayev
using namespace std;
ll max_weights(int n, int m, vector<int>x, vector<int>y, vector<int>w){
ll ans1=0,ans2=0;
for(int i=0;i<m;i++){
if(x[i]%2){
ans1+=w[i];
}
else{
ans2+=w[i];
}
}
return max(ans1,ans2);
}
// void solve(){
//int n,m;
//cin>>n>>m;
//vector<int>x(m),y(m),w(m);
//for(int i=0;i<m;i++){
// cin>>x[i]>>y[i]>>w[i];
//
//}
//cout<<max_weights(n,m,x,y,w);
//
//
//}
//int main(){
// ios_base::sync_with_stdio(false);
//
//solve();
//
//}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
22 ms |
2124 KB |
Output is correct |
2 |
Correct |
28 ms |
2632 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
86 ms |
7268 KB |
Output is correct |
6 |
Correct |
88 ms |
7268 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '2', found: '1' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Incorrect |
15 ms |
1456 KB |
1st lines differ - on the 1st token, expected: '21261825233649', found: '13412238152019' |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '3', found: '2' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '3', found: '2' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '3', found: '2' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Incorrect |
15 ms |
1456 KB |
1st lines differ - on the 1st token, expected: '21261825233649', found: '13412238152019' |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
22 ms |
2124 KB |
Output is correct |
2 |
Correct |
28 ms |
2632 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
86 ms |
7268 KB |
Output is correct |
6 |
Correct |
88 ms |
7268 KB |
Output is correct |
7 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '2', found: '1' |
8 |
Halted |
0 ms |
0 KB |
- |