This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |