結果

問題 No.2247 01 ZigZag
ユーザー 👑 CleyL
提出日時 2023-03-24 11:10:10
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 604 bytes
コンパイル時間 821 ms
コンパイル使用メモリ 66,916 KB
最終ジャッジ日時 2025-02-11 16:44:16
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 49 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
プレゼンテーションモードにする

#include <iostream>
using namespace std;
int main(){
int a,b,c;cin>>a>>b>>c;
int mx = min(a,b)*2;
int x = a-(c/2);
int y = b-(c/2);
if(mx < c || (mx == c && a == b))cout << -1;
else if(mx == 0){
for(int i = 0; a > i; i++)cout << 0;
for(int i = 0; b > i; i++)cout << 1;
}else if(mx == c){
for(int i = 0; c > i; i++)cout << ((i+(b>a))%2);
for(int i = 0; max(x,y) > i; i++)cout << 0+(b>a);
}else{
for(int i = 0; x > i; i++)cout << 0;
for(int i = 1; c > i; i++)cout << (i%2);
for(int i = 0; y > i; i++)cout << 1;
if(c%2 == 0)cout << 0;
}
cout << endl;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0