Submission #122450


Source Code Expand

Copy
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <set>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <iomanip>
#include <iterator>
#include <vector>
#include <limits>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <typeinfo>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <cfloat>
#include <cassert>
#include <cmath>
#include <cctype>
#include <ctime>
#include <sstream>
#include <bitset>

#define reb(i,b,n) for(int i=(int)(b); i<(int)(n); i++)
#define rep(i,n) reb(i,0,n)
#define rer(i,n) for(int i=1; i<=n; i++)
#define rrep(i,n) for(int i = n-1; i >= 0; i--)
#define rreb(i,n,b) for(int i = n; i >= b; i--)
#define resz(i,v) rep(i,sz(v))
#define let(v, x) __typeof(x) v = (x)
#define each(it,v) for(let(it, (v).begin()); it!=(v).end(); it++)
#define reach(it,v) for(let(it, (v).rbegin());i!=(v).rend();i++)
#define priArr(table, n) rep(i,n){cout<<table[i]<<' ';}cout<<'\n';
#define priAr2(table,W,H) rep(y,H){rep(x,W)cout<<table[y][x]<<' ';cout<<'\n';}
#define vall(x) (x).begin(), (x).end()
#define rvall(x) (x).rbegin(), (x).rend()
#define vsort(v) sort(vall(v))
#define rvsort(v) sort(rvall(v))
#define len(array) (sizeof (array) / sizeof *(array))
#define aall(x) x, x+len(x)
#define asort(x) sort(aall(x))
#define rasort(a, type) sort(aall(a), greater<type>())
#define afill(a, v) fill(aall(a), v)
#define afill2(a, v, type) fill((type *)a, (type *)(a + len(a)), v)
#define sz(x) (int)(x).size()
#define mp(a, b) make_pair(a, b)
#define dmax(x,y) x = max(x,y);
#define dmin(x,y) x = min(x,y);
#define dadd(x,y) x = (x+(y))%MOD;
#define ddel(x,y) x = (x-(y)+MOD)%MOD;
#define dmul(x,y) x = ((ll)x*(y))%MOD;
#define snuke srand((unsigned)clock()+(unsigned)time(NULL))
#define fi first
#define se second
#define pb push_back
#define _USE_MATH_DEFINES

using std::stringstream;
using namespace std;

typedef long long ll; typedef unsigned long long ull;
typedef pair <int, int> P; typedef pair <int, P> PP;
typedef vector<int> vi;typedef vector<vi> vvi;typedef vector<string> vs;
typedef vector<ll> vl; typedef vector<P > vP; typedef vector<char> vc;
typedef long double ld;

const static int INF = 0x3f3f3f3f;
const static ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const static double EPS = 1e-9;
const static ll MOD = 1000000007LL;

inline int toInt(std::string s) {int v; std::istringstream sin(s);sin>>v;return v;}
template<class T> inline std::string toString(T x) {std::ostringstream sout;sout<<x;return sout.str();}

int dx[] = {1,0,-1,0}, dy[] = {0,1,0,-1};
/* --------------------------------------------------------------- */

int main(int argc, char *argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(0); // off the sync synchronous of cin and cout

    string s, t;
    cin >> s >> t;

    bool flg = true;
    resz(i, s) {
        if (s[i] != '@' && t[i] != '@') {
            if (s[i] != t[i]) flg = false;

        } else if (s[i] == '@' && t[i] != '@') {
            if (t[i] == 'a' || t[i] == 't' || t[i] == 'c' || t[i] == 'o' ||
                t[i] =='d' || t[i] == 'e' || t[i] == 'r') {
            } else flg = false;

        }  else if (t[i] == '@' && s[i] != '@') {
            if (s[i] == 'a' || s[i] == 't' || s[i] == 'c' || s[i] == 'o' ||
                s[i] =='d' || s[i] == 'e' || s[i] == 'r') {
            } else flg = false;
        }
    }

    if (flg) cout << "You can win" << endl;
    else     cout << "You will lose" << endl;

    return 0;
}

Submission Info

Submission Time
Task B - AtCoderトランプ
User emacs
Language C++ (G++ 4.6.4)
Score 100
Code Size 3693 Byte
Status AC
Exec Time 26 ms
Memory 936 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 78
Set Name Test Cases
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_AAAAAAAAAA_AAAAAAAAAA.txt, test_AAAAAAA_atcoder.txt, test_AAAAAAAcAA_dddddddddd.txt, test_AAA_AAA.txt, test_AAApqAAq_AmAbAAAv.txt, test_A_A.txt, test_A_z.txt, test_Aataodfoad_cazgodeowA.txt, test_AbAAkAtAAA_AbAAkAAAAc.txt, test_AddAAdAccc_cdddAApcAc.txt, test_AeAApAAkAA_AAAApetkAA.txt, test_AeaewrAckd_teaAwrackd.txt, test_AjuAAfw_AjutAfw.txt, test_AkaAAbhbrA_AayAgbrnno.txt, test_Amk_AiA.txt, test_Aqgzjukogn_vqgzjukogn.txt, test_AtAjjlAlj_zxojqerlj.txt, test_aAAAnoAAAA_AAAAnAAAtA.txt, test_aAsAzpurej_AasAzppAej.txt, test_aaaaaaaaaa_tttttttttt.txt, test_acAtasfAtr_acrtasfrtr.txt, test_aercbrAkAc_aeAcbArkAc.txt, test_aeyfyeu_aeyfyAn.txt, test_akAoazoAgA_ardoazoago.txt, test_alqinmkpob_alqizmvprb.txt, test_atgvrdnadg_atgvrdnadg.txt, test_bAozuxujyf_btAzuxujyf.txt, test_beAdgbAvpm_beoAvbAvpm.txt, test_cejeesaetk_cwecdetuvd.txt, test_cnrrdorw_cnrrdArw.txt, test_coaeeccedr_coaeeccedr.txt, test_cogxtrmwlv_cojxzhuyjv.txt, test_cyhn_AyhA.txt, test_dkaykjA_dkaeAjl.txt, test_dtjwlyycmb_zveetyyqmb.txt, test_dxjunaaqfj_dxjurackej.txt, test_eAhatnjhws_uAAAAnoAfs.txt, test_e_r.txt, test_f_k.txt, test_fq_xv.txt, test_gAuuAzhzAf_kiuwszAzAf.txt, test_gaAAAAAAcA_oAAloAmAAm.txt, test_gxghqm_gxghqm.txt, test_humnAvnlbi_humnAvnlbi.txt, test_hzlsl_ozlsl.txt, test_ifiiAAAjnr_ifiirtAjnr.txt, test_ifwmypbnsy_ifwmypbnsy.txt, test_jhxjiskyyf_uqvmsjtptm.txt, test_khinAAAwAf_khinAAAwrf.txt, test_kodtcdckd_kAdtcdckd.txt, test_lkhxgf_xghwgf.txt, test_ltoh_lAoh.txt, test_moeooAtAAt_mAeooAtAdt.txt, test_nbAAqAnga_nlaAqAngA.txt, test_o_o.txt, test_oderoderod_AAoderAAAd.txt, test_ok_Ak.txt, test_pAknA_pAknA.txt, test_p_A.txt, test_ppxAslAquh_ppxAslAquh.txt, test_qcnnrt_ccnnrA.txt, test_tjAmwowdhk_AjeiwAwdhk.txt, test_uAkAs_tlxas.txt, test_u_u.txt, test_ug_ug.txt, test_vAb_vAA.txt, test_vvgxtupvbt_vvgbtupnbp.txt, test_vvvvvvvvvv_vvvvvvvvvv.txt, test_wAAA_AAAA.txt, test_waAqrnAkka_waoqAnAAkA.txt, test_wokclAAA_wAkAqrAd.txt, test_xkhqxlzkzs_xkhqxlzkzs.txt, test_z_z.txt, test_zctrfqAsAn_zAyrgqtsdn.txt, test_zzsxnmjzfn_zzsxnmjzfn.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 21 ms 936 KB
00_sample_02.txt AC 20 ms 804 KB
00_sample_03.txt AC 21 ms 928 KB
test_AAAAAAAAAA_AAAAAAAAAA.txt AC 21 ms 796 KB
test_AAAAAAA_atcoder.txt AC 20 ms 924 KB
test_AAAAAAAcAA_dddddddddd.txt AC 20 ms 800 KB
test_AAA_AAA.txt AC 21 ms 932 KB
test_AAApqAAq_AmAbAAAv.txt AC 20 ms 788 KB
test_A_A.txt AC 20 ms 804 KB
test_A_z.txt AC 21 ms 804 KB
test_Aataodfoad_cazgodeowA.txt AC 21 ms 756 KB
test_AbAAkAtAAA_AbAAkAAAAc.txt AC 20 ms 804 KB
test_AddAAdAccc_cdddAApcAc.txt AC 20 ms 804 KB
test_AeAApAAkAA_AAAApetkAA.txt AC 21 ms 808 KB
test_AeaewrAckd_teaAwrackd.txt AC 21 ms 736 KB
test_AjuAAfw_AjutAfw.txt AC 23 ms 752 KB
test_AkaAAbhbrA_AayAgbrnno.txt AC 21 ms 932 KB
test_Amk_AiA.txt AC 21 ms 932 KB
test_Aqgzjukogn_vqgzjukogn.txt AC 20 ms 800 KB
test_AtAjjlAlj_zxojqerlj.txt AC 19 ms 796 KB
test_aAAAnoAAAA_AAAAnAAAtA.txt AC 21 ms 808 KB
test_aAsAzpurej_AasAzppAej.txt AC 22 ms 932 KB
test_aaaaaaaaaa_tttttttttt.txt AC 20 ms 808 KB
test_acAtasfAtr_acrtasfrtr.txt AC 21 ms 928 KB
test_aercbrAkAc_aeAcbArkAc.txt AC 21 ms 928 KB
test_aeyfyeu_aeyfyAn.txt AC 23 ms 804 KB
test_akAoazoAgA_ardoazoago.txt AC 22 ms 936 KB
test_alqinmkpob_alqizmvprb.txt AC 21 ms 796 KB
test_atgvrdnadg_atgvrdnadg.txt AC 22 ms 936 KB
test_bAozuxujyf_btAzuxujyf.txt AC 22 ms 928 KB
test_beAdgbAvpm_beoAvbAvpm.txt AC 22 ms 764 KB
test_cejeesaetk_cwecdetuvd.txt AC 22 ms 804 KB
test_cnrrdorw_cnrrdArw.txt AC 23 ms 804 KB
test_coaeeccedr_coaeeccedr.txt AC 26 ms 748 KB
test_cogxtrmwlv_cojxzhuyjv.txt AC 23 ms 816 KB
test_cyhn_AyhA.txt AC 24 ms 808 KB
test_dkaykjA_dkaeAjl.txt AC 23 ms 800 KB
test_dtjwlyycmb_zveetyyqmb.txt AC 20 ms 804 KB
test_dxjunaaqfj_dxjurackej.txt AC 21 ms 808 KB
test_eAhatnjhws_uAAAAnoAfs.txt AC 22 ms 804 KB
test_e_r.txt AC 22 ms 808 KB
test_f_k.txt AC 21 ms 924 KB
test_fq_xv.txt AC 20 ms 924 KB
test_gAuuAzhzAf_kiuwszAzAf.txt AC 22 ms 804 KB
test_gaAAAAAAcA_oAAloAmAAm.txt AC 21 ms 796 KB
test_gxghqm_gxghqm.txt AC 21 ms 804 KB
test_humnAvnlbi_humnAvnlbi.txt AC 23 ms 928 KB
test_hzlsl_ozlsl.txt AC 22 ms 736 KB
test_ifiiAAAjnr_ifiirtAjnr.txt AC 22 ms 932 KB
test_ifwmypbnsy_ifwmypbnsy.txt AC 21 ms 792 KB
test_jhxjiskyyf_uqvmsjtptm.txt AC 21 ms 932 KB
test_khinAAAwAf_khinAAAwrf.txt AC 22 ms 800 KB
test_kodtcdckd_kAdtcdckd.txt AC 21 ms 924 KB
test_lkhxgf_xghwgf.txt AC 20 ms 800 KB
test_ltoh_lAoh.txt AC 20 ms 800 KB
test_moeooAtAAt_mAeooAtAdt.txt AC 20 ms 924 KB
test_nbAAqAnga_nlaAqAngA.txt AC 20 ms 804 KB
test_o_o.txt AC 21 ms 804 KB
test_oderoderod_AAoderAAAd.txt AC 22 ms 804 KB
test_ok_Ak.txt AC 20 ms 800 KB
test_pAknA_pAknA.txt AC 20 ms 932 KB
test_p_A.txt AC 21 ms 924 KB
test_ppxAslAquh_ppxAslAquh.txt AC 21 ms 804 KB
test_qcnnrt_ccnnrA.txt AC 20 ms 800 KB
test_tjAmwowdhk_AjeiwAwdhk.txt AC 21 ms 928 KB
test_uAkAs_tlxas.txt AC 20 ms 800 KB
test_u_u.txt AC 22 ms 808 KB
test_ug_ug.txt AC 21 ms 804 KB
test_vAb_vAA.txt AC 20 ms 796 KB
test_vvgxtupvbt_vvgbtupnbp.txt AC 20 ms 804 KB
test_vvvvvvvvvv_vvvvvvvvvv.txt AC 20 ms 800 KB
test_wAAA_AAAA.txt AC 21 ms 796 KB
test_waAqrnAkka_waoqAnAAkA.txt AC 20 ms 804 KB
test_wokclAAA_wAkAqrAd.txt AC 21 ms 936 KB
test_xkhqxlzkzs_xkhqxlzkzs.txt AC 21 ms 808 KB
test_z_z.txt AC 21 ms 932 KB
test_zctrfqAsAn_zAyrgqtsdn.txt AC 21 ms 804 KB
test_zzsxnmjzfn_zzsxnmjzfn.txt AC 20 ms 932 KB