标签:style blog color io ar for 2014 div cti
/******************************************************************** @file Main_practise.cpp @date 2014-9-3 @author Tiger @brief Ignatius and the Princess IV ********************************************************************/ #include <cstdio> int main(int argc, const char* argv[]) { int nNumbers = 0; while (scanf("%d", &nNumbers) != EOF) { int nCur = 0, nMax = 0, nCnt = 0; for (int i=0; i<nNumbers; ++i) { scanf("%d", &nCur); if (0 == nCnt) { nMax = nCur; nCnt = 1; } else { if (nMax == nCur) { ++nCnt; } else { --nCnt; } } } printf("%d\n", nMax); } return 0; }
标签:style blog color io ar for 2014 div cti
原文地址:http://www.cnblogs.com/roronoa-zoro-zrh/p/3952965.html