求调SPJ
  • 板块灌水区
  • 楼主Teto_etf
  • 当前回复0
  • 已保存回复0
  • 发布时间2023/11/1 11:11
  • 上次更新2023/11/2 10:27:32
查看原帖
求调SPJ
748450
Teto_etf楼主2023/11/1 11:11

rt。

报错信息:

wrong output format
Unexpected end of file - int32 expected
#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;

int a[2010];
int suma[2010];

int main(int argc, char* argv[]) {
    registerTestlibCmd(argc, argv);
    
    int I = 0;
    while (!ouf.eof()) I++, a[I] = ouf.readInt();
    ouf.readEof();
    for (int i = 1; i <= I; i++) suma[i] = suma[i - 1] + a[i];
    int n = inf.readInt(), t = inf.readInt();
    inf.readEoln();
    
    bool QAQ = false;
    while (!inf.eof()) {
    	int l, r, x;
    	l = inf.readInt(), r = inf.readInt(), x = inf.readInt();
    	if (x != suma[r] - suma[l - 1]) QAQ = true;
    	inf.readEoln();
	}
	
	if (I != n) quitf(_wa, "QAQ");
	else if (QAQ) quitf(_wa, "QAQ");
	else quitf(_ok, "AwA");
    return 0;
}
2023/11/1 11:11
加载中...