Title: Give you some questions about the output, judging whether it is ac,pe or WA.
Analysis: Simulation. According to the test instructions simulation, note that the PE condition is the same for all numeric characters appearing in the same order.
Description: Remember many years ago written OJ the background of the procedure ╮(╯▽╰)╭.
#include <algorithm> #include <iostream> #include <cstdlib> #include <cstring> #include < Cstdio> #include <cmath>using namespace Std;char list1[101][122];char List2[101][122];char Numb1[12001];char Numb2[12001];int Main () {int n,m,t = 1;while (~scanf ("%d", &n) && N) {getchar (); for (int i = 0; i < n; + + i) g ETS (List1[i]); scanf ("%d", &m); GetChar (); for (int i = 0; i < m; + + i) gets (list2[i]); int AC = 1;if (M = = N) {for (int i = 0; I < n; + + i) if (strcmp (List1[i], list2[i]) {AC = 0;break;}} else AC = 0;int PE = 1,save1 = 0,save2 = 0;for (int i = 0; i < n; + + i) for (int j = 0; list1[i][j]; + + j) if (list1[i][j ] >= ' 0 ' && list1[i][j] <= ' 9 ') numb1[save1 + +] = list1[i][j];for (int i = 0; i < m; + + i) for (int j = 0; LIST2[I][J]; + + j) if (List2[i][j] >= ' 0 ' && list2[i][j] <= ' 9 ') Numb2[save2 + +] = list2[i][j];if (save1 = = save2) {for (in t i = 0; i < save1; + + i) if (numb1[i]! = Numb2[i]) {PE = 0;break;}} else PE = 0;printf ("Run #%d:", T + +), if (AC) printf ("accepted\n"), else if (PE) printf ("Presentation error\n"), Else printf ("wrong Answer\n ");} return 0;}
UVa 10188-automated Judge Script