답안 #51284

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
51284 2018-06-17T12:00:34 Z Mamnoon_Siam Roller Coaster Railroad (IOI16_railroad) C++17
0 / 100
73 ms 7572 KB
#include "railroad.h"
 
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) {
    int c = 0;
    for(int i = 0; i < t.size(); i++) {
    	if(t[i] == 0) c++;
    }
    if(c > 1) return 0;
    return 1;
}

Compilation message

railroad.cpp: In function 'long long int plan_roller_coaster(std::vector<int>, std::vector<int>)':
railroad.cpp:5:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < t.size(); i++) {
                    ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 504 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 504 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 73 ms 7572 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 504 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -