QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#81911#1. I/O TestqCompile Error//C++141.4kb2023-02-26 18:08:002023-02-26 18:09:50

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-26 18:09:50]
  • 评测
  • [2023-02-26 18:08:00]
  • 提交

config.txt

#include<bits/stdc++.h>
using namespace std;
int read(){
	int x=0,f=1;
	char ch=getchar();
	for(;ch<'0'||ch>'9';){
		if(ch=='-'){
			f=-1;
		}
		ch=getchar();
	}
	for(;ch>='0'&&ch<='9';){
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	return x*f;
}
void write(int x){
	if(x<0){
		putchar('-'),x=-x;
	}
	if(x>9){
		write(x/10);
	}
	putchar(x%10+'0');
}
int n,ans;
int main(){
	n=read();
	for(int i=1;i<=n;i++){
		ans+=read();
	}
	write(ans);
	return 0;
}

input_test

#include<bits/stdc++.h>
using namespace std;
int read(){
	int x=0,f=1;
	char ch=getchar();
	for(;ch<'0'||ch>'9';){
		if(ch=='-'){
			f=-1;
		}
		ch=getchar();
	}
	for(;ch>='0'&&ch<='9';){
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	return x*f;
}
void write(int x){
	if(x<0){
		putchar('-'),x=-x;
	}
	if(x>9){
		write(x/10);
	}
	putchar(x%10+'0');
}
int n,ans;
int main(){
	n=read();
	for(int i=1;i<=n;i++){
		ans+=read();
	}
	write(ans);
	return 0;
}

output_test

#include<bits/stdc++.h>
using namespace std;
int read(){
	int x=0,f=1;
	char ch=getchar();
	for(;ch<'0'||ch>'9';){
		if(ch=='-'){
			f=-1;
		}
		ch=getchar();
	}
	for(;ch>='0'&&ch<='9';){
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	return x*f;
}
void write(int x){
	if(x<0){
		putchar('-'),x=-x;
	}
	if(x>9){
		write(x/10);
	}
	putchar(x%10+'0');
}
int n,ans;
int main(){
	n=read();
	for(int i=1;i<=n;i++){
		ans+=read();
	}
	write(ans);
	return 0;
}

详细

Invalid Configuration File: failed to read Nin and Nout