結果
| 問題 |
No.1523 +/- Tree
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-28 21:12:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 301 bytes |
| コンパイル時間 | 524 ms |
| コンパイル使用メモリ | 63,696 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-07 10:45:18 |
| 合計ジャッジ時間 | 2,888 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 43 WA * 1 |
コンパイルメッセージ
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;
if((N-1)%K==0)cout<<"No"<<endl;
else
{
cout<<"Yes"<<endl;
int w=1e9;
for(int i=0;i<N-1;i++)
{
cout<<i+1<<" "<<i+2<<" ";
if(i%K==0)cout<<w-1<<endl;
else if(i%K<K-1)cout<<0<<endl;
else cout<<-w<<endl;
}
}
}