제출 #465091

#제출 시각아이디문제언어결과실행 시간메모리
465091QuentolosseAwesome Arrowland Adventure (eJOI19_adventure)C++14
22 / 100
1 ms236 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...