結果
| 問題 | No.3562 Communicate Sorted Vector |
| コンテスト | |
| ユーザー |
Salt
|
| 提出日時 | 2026-05-30 12:00:58 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,487 bytes |
| 記録 | |
| コンパイル時間 | 2,605 ms |
| コンパイル使用メモリ | 335,000 KB |
| 実行使用メモリ | 30,320 KB |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2026-05-30 12:01:19 |
| 合計ジャッジ時間 | 17,254 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| 部分点1 | 10 % | AC * 45 |
| 部分点2 | 25 % | AC * 45 |
| 部分点3 | 65 % | AC * 40 WA * 6 |
| 合計 | 35 点 |
ソースコード
#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
//https://boostjp.github.io/tips/multiprec-int.html
using lll = __int128_t;
#define YES cout<<"Yes\n"
#define NO cout<<"No\n"
#define YN {cout<<"Yes\n";}else{cout<<"No\n";}// if(a==b)YN;
#define NO2 cout<<"-1\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i, n) for (int i=int(n)-1; i>=0; --i)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string P;
int N,Q;
cin>>P>>N>>Q;
if (P == "Alice") {
vector<ll> A(N);
rep(i,N) {
cin >> A[i];
A[i]++;
}
cout << N << endl;
cout << flush;
rep(i,N) {
string s;
while(A[i]>0) {
s += '0'+(A[i]%2);
A[i]/=2;
}
reverse(all(s));
for (int i=1; i<s.size(); ++i) cout << s[i];
cout << endl << flush;
}
}
else {
int K;
cin >> K;
vector<ll> A(K);
rep(i,K) {
string s;
cin >> s;
ll num = 1;
for (int j=0; j<s.size(); ++j) {
num *= 2;
num += s[j]-'0';
}
A[i] = num-1;
}
rep(i,K) cout << A[i] << ' ';
cout << endl << flush;
}
}
Salt