結果

問題 No.2608 Divide into two
ユーザー soldraysoldray
提出日時 2024-01-22 18:50:27
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 661 bytes
コンパイル時間 3,963 ms
コンパイル使用メモリ 119,296 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-22 18:50:32
合計ジャッジ時間 1,965 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 WA -
testcase_02 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;

using i64 = long long;

#define yn(pope) (pope ? "Yes" : "No")

#define rep(i, n, m) for (int i = (n); i < (m); i++)
#define rrep(i, n, m) for (int i = (n); i > m; i--)

#define IINF (1 << 30)
#define INF (1ll << 60)

#define all(v) v.begin(), v.end()

int main() {
  int T; cin >> T;

  while (T--) {
    int N; cin >> N;

    string ans = "";

    rep(i, 0, N >> 2) {
      ans += "0110";
    }

    N %= (1 << 2);

    if (1 <= N && N <= 2) {
      ans = "-1";
    }

    if (N == 3) {
      ans += "110";
    }

    cout << ans << endl;
  }

  return 0;
}
0