結果
| 問題 |
No.2247 01 ZigZag
|
| コンテスト | |
| ユーザー |
batasanblog
|
| 提出日時 | 2023-03-17 22:28:31 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,309 bytes |
| コンパイル時間 | 3,692 ms |
| コンパイル使用メモリ | 253,444 KB |
| 最終ジャッジ日時 | 2025-02-11 13:35:45 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 WA * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
//using mint = static_modint<998244353>;
//using mint = modint;
using mint = static_modint<1000000007>;
using vm = vector<mint>;
using vvm = vector<vm>;
ostream &operator<<(ostream &o,const mint &m){cout<<m.val();return o;}
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using pl = pair<ll,ll>;
#define rep(i,n) for(ll i=0;i<(ll)(n);++i)
#define reps(i,s,n) for(ll i=(s);i<(ll)(n);++i)
#define rep1(i,n) for(ll i=1;i<=(ll)(n);++i)
#define ts(i) to_string(i)
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
const long long INF = 1e18;
#ifdef DEBUG
#include <debug.hpp>
#endif
int main(){
#ifdef DEBUG
cout << "--- Input ---" << endl;
#endif
ll N,M,K;
cin >> N>>M>>K;
ll y=(K+1)/2;
ll x=K+1-y;
#ifdef DEBUG
cout<<"N="<<N<<" M="<<M<<" K="<<K<<"x="<<x<<" y="<<y<<endl;
cout << "--- Logic ---" << endl;
#endif
string s="";
ll xx=x,yy=y;
while(xx>0||yy>0){
if(xx-->0)s+='0';
if(yy-->0)s+='1';
}
#ifdef DEBUG
cout<<"s="<<s<<endl;
#endif
if(N-x<0||M-y<0)s="-1";
else{
string tmp="";
rep(i,N-x){
tmp+='0';
}
s=tmp+s;
rep(i,M-y){
s+='1';
}
}
#ifdef DEBUG
cout << "--- Answer ---" << endl;
#endif
cout<<s<<endl;
}
//cout << fixed << setprecision(9);
batasanblog