Submission #465088

# Submission time Handle Problem Language Result Execution time Memory
465088 2021-08-15T07:39:18 Z Quentolosse Game (eJOI20_game) C++14
0 / 100
1 ms 296 KB
#include<iostream>

using namespace std;

int main ()
{
    int nbLignes, nbColonnes, totalModif = 0;
    bool possible = true;
    cin >> nbLignes >> nbColonnes;
    for (int i = 0; i < nbColonnes - 1 && possible; i++)
    {
        char caseEnCours;
        cin >> caseEnCours;
        switch (caseEnCours)
        {
        case 'X':
            cout << -1;
            possible = false;
            break;
        case 'E':
            break;
        case 'N':
            totalModif ++;
            break;
        case 'W':
            totalModif += 2;
            break;
        case 'S':
            totalModif += 3;
            break;
        }
    } 
    if (possible)
    {
        cout << totalModif << endl;
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 296 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 288 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 284 KB Output is correct
4 Incorrect 0 ms 204 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -