結果

問題 No.2925 2-Letter Shiritori
ユーザー batapi0311batapi0311
提出日時 2024-10-12 16:46:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 5,808 bytes
コンパイル時間 1,849 ms
コンパイル使用メモリ 176,012 KB
実行使用メモリ 25,740 KB
平均クエリ数 2.00
最終ジャッジ日時 2024-10-12 16:46:19
合計ジャッジ時間 3,846 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

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

#include <bits/stdc++.h>
//#include <ranges>
#define _USE_MATH_DEFINES
//#include <atcoder/all>
//using namespace atcoder;
//#include <atcoder/modint>
//using mint = modint998244353;
//using mint = modint1000000007;
using namespace std;
//using mint = modint;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define V vector<ll>
#define Vi vector<int>
#define Vd vector<double>
#define Vb vector<bool>
#define Vs vector<string>
#define Vc vector<char>
#define VV vector<V>
using P = pair<ll,ll>;
using G = vector<vector<int>>;
#define VP vector<P>
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define INF 1LL << 60
#define inf 1e9
template <typename T>
bool chmax(T &a, const T& b) {
if (a < b) {
a = b; // ab
return true;
}
return false;
}
template <typename T>
bool chmin(T &a, const T& b) {
if (a > b) {
a = b; // ab
return true;
}
return false;
}
long long combi(long long n, long long k) {
if (n == k || k == 0)
return 1;
else {
return combi(n - 1, k - 1) + combi(n - 1, k);
}
}
//
bool isNumber(const string& str)
{
for (const char &c : str) {
if (std::isdigit(c) == 0) return false;
}
return true;
}
///*
//
ll gcd(ll a, ll b){
if(b==0){
return a;
}else{
return gcd(b, a%b);
}
}
//
ll lcm(ll a, ll b){
ll g=gcd(a,b);
return a/g*b;
}
//*/
//int di[] = {-1,0,1,0};
//int dj[] = {0,-1,0,1};
//s = regex_replace(s, regex(""), "");
/*stiring char
s.find(c)!=string::npos
*/
/*//
int wa(int n){
int sum =0;
while(n>0){
sum += n%10;
n/=10;
}
return sum;
}
*/
/*
//
int ki(int i){
int k = 1;
for(int j = 1; j<=i; j++){
k *= j;
}
return k;
}
*/
/*log_x(b)
double logN(double x, double b) {
return log(x) / log(b);
}
*/
//
/*
// mainSieveofEratosthenes();!!
const ll N = 101010;//
Vb isp(N+1,true);
void SieveofEratosthenes(){
isp[0] = false;
isp[1] = false;
for(ll i = 2; i+i<=N;i++){
if(isp[i])for(ll j = 2; i*j<=N;j++)isp[i*j] = false;
}
}
//
*/
//
/*
// O(√n)
vector<long long> divisor(long long n) {
vector<long long> ret;
for (long long i = 1; i * i <= n; i++) {
if (n % i == 0) {
ret.push_back(i);
if (i * i != n) ret.push_back(n / i);
}
}
sort(ret.begin(), ret.end()); //
return ret;
}
//
*/
///*
//O(√n)
map< ll, ll > prime_factor(ll n) {
map< ll, ll > ret;
for(ll i = 2; i * i <= n; i++) {
while(n % i == 0) {
ret[i]++;
n /= i;
}
}
if(n != 1) ret[n] = 1;
return ret;
}
//*/
/*
ll modpow(ll x, ll n, ll mod){
while(n){
ll resu = 1;
if(n&1)res = (res * x) %mod;
x = (x*x)%mod;
n>>=1;
}
return res;
}
*/
/*
//
//abm
//aa^1→a^2→a^4→a^8→…
ll power(ll a,ll b, ll m){
ll p = a,ans = 1;
rep(i,60){
ll wari = (1LL<<i);
if((b/wari)%2==1){
ans=(ans*p)%m;
}
p=(p*p)%m;
}
return ans;
}
*/
//
/*
template <typename T> bool next_combination(const T first, const T last, int k) {
const T subset = first + k;
// empty container | k = 0 | k == n
if (first == last || first == subset || last == subset) {
return false;
}
T src = subset;
while (first != src) {
src--;
if (*src < *(last - 1)) {
T dest = subset;
while (*src >= *dest) {
dest++;
}
iter_swap(src, dest);
rotate(src + 1, dest + 1, last);
rotate(subset, subset + (last - dest) - 1, last);
return true;
}
}
// restore
rotate(first, subset, last);
return false;
}
//
*/
int ctoi(char c){
if(c=='1')return 1;
else if(c=='2')return 2;
else if(c=='3')return 3;
else if(c=='4')return 4;
else if(c=='5')return 5;
else if(c=='6')return 6;
else if(c=='7')return 7;
else if(c=='8')return 8;
else if(c=='9')return 9;
else if(c=='0')return 0;
else return -inf;
}
//vector<int> dx = {1,0,-1,0,1,-1,-1,1};
//vector<int> dy = {0,1,0,-1,1,1,-1,-1};
//int dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 };
int dx[8] = { 0, 1, 0, -1, 1, 1, -1, -1 }, dy[8] = { 1, 0, -1, 0, 1, -1, 1, -1 };
//int dx[8]={0,-1,-1,-1,0,1,1,1},dy[8]={1,1,0,-1,-1,-1,0,1};
//#define mod 998244353
//cout << mint.val() << endl;
//cout << fixed << setprecision(15) << y << endl;
//bit s i
#define bittate(s,i) s | (1LL<<i)
//bit s i
#define bitkeshi(s,i) s^(1LL<<i)
//bit s i
#define bitcheck(s,i) (s>>i)&1LL
//string str(bitset<32>(value).to_string<char, char_traits<char>, allocator<char> >());
#define ppc(n) __popcount(n)
string lltobin(ll n){
string re((bitset<61>(n).to_string<char, char_traits<char>, allocator<char> >()));
return re;
}
ll bintoll(string s){
ll re=stoll(s,nullptr,2);
return re;
}
#define yes "Yes"
#define no "No"
#define Yes "YES"
#define No "NO"
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
char a,b;
cin >> a;
b=a;
while(true){
cout << '?' << endl;
cout << b << a << endl;
char c;
cin >> c;
if(c=='!'){
string s;
cin >> s;
return 0;
}else{
string t;
cin >> t;
b=t[1];
}
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0