답안 #625846

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
625846 2022-08-10T22:10:56 Z kkkkkkkk 메기 농장 (IOI22_fish) C++17
3 / 100
109 ms 7280 KB
#include <bits/stdc++.h>

using namespace std;

long long max_weights(int n,int m,vector<int> x,vector<int> y,vector<int> w)
{
    long long vk=0;
    bool first=true;
    for (int i=0;i<m;i++)
        if (w[i]%2==1)
        {
            first=false;
            break;
        }
    if (first)
    {
        for (int i=0;i<m;i++)
            vk+=w[i];
    }
    else
    {
        long long kaj_nula=0,kaj_eden=0;
        for (int i=0;i<m;i++)
        {
            if (x[i]==0)
                kaj_nula+=w[i];
            else
                kaj_eden+=w[i];
        }
        vk=max(kaj_nula,kaj_eden);
    }
    return vk;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 2140 KB Output is correct
2 Correct 27 ms 2640 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 84 ms 7280 KB Output is correct
6 Correct 109 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 1460 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '26722445760742'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 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 1460 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '26722445760742'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 2140 KB Output is correct
2 Correct 27 ms 2640 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 84 ms 7280 KB Output is correct
6 Correct 109 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 -