結果
| 問題 | No.1376 Simple LPS Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-05 22:00:35 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 469 bytes |
| 記録 | |
| コンパイル時間 | 502 ms |
| コンパイル使用メモリ | 65,304 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-02 12:29:31 |
| 合計ジャッジ時間 | 3,944 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 51 WA * 9 |
コンパイルメッセージ
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(K>=4)
{
for(int i=0;i<K;i++)cout<<0;
for(int i=0;i<N-K;i++)cout<<(i%4==1?0:1);
cout<<endl;
}
else if(K*2>=N)
{
for(int i=0;i<K;i++)cout<<0;
for(int i=0;i<N-K;i++)cout<<1;
cout<<endl;
}
else
{
if(K==1)cout<<-1<<endl;
else if(K==2)cout<<-1<<endl;
else if(K==3)
{
if(N==7)cout<<"0001011"<<endl;
else if(N==8)cout<<"00010111"<<endl;
else cout<<-1<<endl;
}
}
}