mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-23 06:38:42 +00:00
96d4a3ecf7
Due to historical reasons, the code is in subfolder "1". With SVN removal, we place the code back and remove the annoying "1" folder.
28 lines
762 B
C++
28 lines
762 B
C++
#include "testlib.h"
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
const string YES = "YES";
|
|
const string NO = "NO";
|
|
|
|
int main(int argc, char * argv[])
|
|
{
|
|
setName("YES or NO (case insensetive)");
|
|
registerTestlibCmd(argc, argv);
|
|
|
|
std::string ja = upperCase(ans.readWord());
|
|
std::string pa = upperCase(ouf.readWord());
|
|
|
|
if (ja != YES && ja != NO)
|
|
quitf(_fail, "%s or %s expected in answer, but %s found", YES.c_str(), NO.c_str(), compress(ja).c_str());
|
|
|
|
if (pa != YES && pa != NO)
|
|
quitf(_pe, "%s or %s expected, but %s found", YES.c_str(), NO.c_str(), compress(pa).c_str());
|
|
|
|
if (ja != pa)
|
|
quitf(_wa, "expected %s, found %s", compress(ja).c_str(), compress(pa).c_str());
|
|
|
|
quitf(_ok, "answer is %s", ja.c_str());
|
|
}
|