結果

問題 No.991 N×Mマス計算(構築)
ユーザー kotatsugamekotatsugame
提出日時 2020-02-07 06:49:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 505 ms
コンパイル使用メモリ 69,808 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-25 22:58:43
合計ジャッジ時間 4,006 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 29 ms
4,348 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 7 ms
4,348 KB
testcase_12 AC 7 ms
4,348 KB
testcase_13 AC 14 ms
4,348 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 7 ms
4,348 KB
testcase_17 AC 7 ms
4,348 KB
testcase_18 AC 7 ms
4,348 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 7 ms
4,348 KB
testcase_22 AC 7 ms
4,348 KB
testcase_23 AC 21 ms
4,348 KB
testcase_24 WA -
testcase_25 AC 8 ms
4,348 KB
testcase_26 WA -
testcase_27 AC 6 ms
4,348 KB
testcase_28 AC 32 ms
4,348 KB
testcase_29 AC 7 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<map>
using namespace std;
int N,M;
char op;
long A[1<<17],B[1<<17];
long K,X;
main()
{
	cin>>X;
	if(X==0)
	{
		N=1;
		M=2;
		K=2;
		A[0]=B[0]=B[1]=1;
	}
	else
	{
		K=1e9;
		M=5e4;
		N=X/M+1;
		int L=N*M-X;
		for(int i=0;i<N-1;i++)A[i]=1e9;
		A[N-1]=1;
		B[0]=X-(L-1);
		for(int j=1;j<L;j++)B[j]=1;
		for(int j=L;j<M;j++)B[j]=1e9;
	}
	cout<<N<<" "<<M<<" "<<K<<endl;
	cout<<"*";
	for(int j=0;j<M;j++)cout<<" "<<B[j];
	cout<<endl;
	for(int i=0;i<N;i++)cout<<A[i]<<endl;
}
0