結果
| 問題 |
No.942 プレゼント配り
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-09 00:43:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 273 bytes |
| コンパイル時間 | 518 ms |
| コンパイル使用メモリ | 59,904 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-02 23:03:07 |
| 合計ジャッジ時間 | 3,167 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 WA * 11 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
4 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
int N,K;
main()
{
cin>>N>>K;
int t=N/K;
if(t%2)
{
cout<<"No"<<endl;
}
else
{
cout<<"Yes"<<endl;
for(int i=0;i<K;i++)
{
for(int j=0;j<t;j++)
{
cout<<(j%2==0?j*t+i+1:j*t+t-i)<<" ";
}
cout<<endl;
}
}
}