提出 #1039437


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;

using ll=long long;
#define int ll

#define FOR(i,a,b) for(int i=int(a);i<int(b);i++)
#define REP(i,b) FOR(i,0,b)
#define MP make_pair
#define PB push_back
#define ALL(x) x.begin(),x.end()
#define REACH cerr<<"reached line "<<__LINE__<<endl
#define DBG(x) cerr<<"line "<<__LINE__<<" "<<#x<<":"<<x<<endl

using pi=pair<int,int>;
using vi=vector<int>;
using ld=long double;

template<class T,class U>
ostream& operator<<(ostream& os,const pair<T,U>& p){
	os<<"("<<p.first<<","<<p.second<<")";
	return os;
}

template<class T>
ostream& operator <<(ostream& os,const vector<T>& v){
	os<<"[";
	REP(i,(int)v.size()){
		if(i)os<<",";
		os<<v[i];
	}
	os<<"]";
	return os;
}

int read(){
	int i;
	scanf("%lld",&i);
	return i;
}

void printSpace(){
	printf(" ");
}

void printEoln(){
	printf("\n");
}

void print(int x,int suc=1){
	printf("%lld",x);
	if(suc==1)
		printEoln();
	if(suc==2)
		printSpace();
}

string readString(){
	static char buf[3341919];
	scanf("%s",buf);
	return string(buf);
}

char* readCharArray(){
	static char buf[3341919];
	static int bufUsed=0;
	char* ret=buf+bufUsed;
	scanf("%s",ret);
	bufUsed+=strlen(ret)+1;
	return ret;
}

template<class T,class U>
void chmax(T& a,U b){
	if(a<b)
		a=b;
}

template<class T,class U>
void chmin(T& a,U b){
	if(a>b)
		a=b;
}

template<class T>
T Sq(const T& t){
	return t*t;
}

signed main(){
	int t=read();
	assert(t==1);
	vi ans={2,2,1,2,1,2,1,1,2,3,1,1};
	ans.resize(200*30*50,0);
	print(ans.size());
	REP(i,ans.size())
		print(ans[i],i==int(ans.size())-1?1:2);
}

提出情報

提出日時
問題 J - Just a Single Testcase
ユーザ omoitukanai
言語 C++14 (GCC 5.4.1)
得点 50
コード長 1664 Byte
結果 RE
実行時間 111 ms
メモリ 3200 KiB

コンパイルエラー

./Main.cpp: In function ‘ll read()’:
./Main.cpp:38:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&i);
                  ^
./Main.cpp: In function ‘std::string readString()’:
./Main.cpp:60:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%s",buf);
                 ^
./Main.cpp: In function ‘char* readCharArray()’:
./Main.cpp:68:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%s",ret);
                 ^

ジャッジ結果

セット名 dataset1 dataset2
得点 / 配点 50 / 50 0 / 50
結果
AC × 1
RE × 1
セット名 テストケース
dataset1 1.txt
dataset2 2.txt
ケース名 結果 実行時間 メモリ
1.txt AC 30 ms 3200 KiB
2.txt RE 111 ms 256 KiB