Submission #51287

# Submission time Handle Problem Language Result Execution time Memory
51287 2018-06-17T12:02:54 Z Mamnoon_Siam Roller Coaster Railroad (IOI16_railroad) C++17
0 / 100
111 ms 3604 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 > 0) 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++) {
                    ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 111 ms 3604 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -