結果
| 問題 | 
                            No.1376 Simple LPS Problem
                             | 
                    
| コンテスト | |
| ユーザー | 
                             沙耶花
                         | 
                    
| 提出日時 | 2021-02-05 21:54:06 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 312 bytes | 
| コンパイル時間 | 2,406 ms | 
| コンパイル使用メモリ | 191,584 KB | 
| 最終ジャッジ日時 | 2025-01-18 12:16:56 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 48 WA * 12 | 
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 10000000000000001
int main(){
	
	int N,K;
	cin>>N>>K;
	
	if((N+1)/2 <= K){
		string ans(N,'1');
		rep(i,K)ans[i] = '0';
		cout<<ans<<endl;
	}
	else{
		cout<<-1<<endl;
	}
	
	
	return 0;
}
            
            
            
        
            
沙耶花