답안 #629069

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
629069 2022-08-14T06:56:07 Z kwongweng 메기 농장 (IOI22_fish) C++17
0 / 100
86 ms 14668 KB
#include "fish.h"

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
#define FOR(i,a,b) for(int i = a; i < b; i++)

ll max_weights(int N, int M, vi X, vi Y, vi W) {
  vector<ll> A(2);
  FOR(i,0,W.size()){
    A[X[i]]+=W[i];
  }
  return max(A[0],A[1]);
}

Compilation message

fish.cpp: In function 'll max_weights(int, int, vi, vi, vi)':
fish.cpp:8:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 | #define FOR(i,a,b) for(int i = a; i < b; i++)
......
   12 |   FOR(i,0,W.size()){
      |       ~~~~~~~~~~~~                   
fish.cpp:12:3: note: in expansion of macro 'FOR'
   12 |   FOR(i,0,W.size()){
      |   ^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 2140 KB Output is correct
2 Correct 25 ms 2636 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Runtime error 86 ms 14668 KB Execution killed with signal 11
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 Runtime error 1 ms 340 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Runtime error 1 ms 340 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 2140 KB Output is correct
2 Correct 25 ms 2636 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Runtime error 86 ms 14668 KB Execution killed with signal 11
6 Halted 0 ms 0 KB -