제출 #598860

#제출 시각아이디문제언어결과실행 시간메모리
598860almothana05Cards (LMIO19_korteles)C++14
36 / 100
1103 ms31416 KiB
#include<bits/stdc++.h> #define mod 1000000007 using namespace std; map<string , int>links , rechts , ob , un ; map<string , int>karte, linkob , obrech , rechun , untlink ; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); long long menge , numm , nummer , len, erg = 0; string s, t; cin >> menge; for(int i = 0 ; i < menge ; i++){ cin >> s; cin >> t; for(int j = 0 ; j < t.size() ; j++){ s += t[j]; } t.clear(); t += s[0]; t += s[2]; erg += rechts[t]; t.clear(); t += s[1]; t += s[3]; erg += links[t]; t.clear(); t += s[0]; t += s[1]; erg += un[t]; t.clear(); t += s[2]; t += s[3]; erg += ob[t]; if(s[0] == s[3] && s[1] == s[2]){ t.clear(); t += s[1]; t += s[0]; t += s[3]; t += s[2]; if(karte[t] > 0){ erg += 3; } } ///////////////////////////////////////////////////// t.clear(); t += s[1]; t += s[0]; t += s[3]; t += s[2]; erg -= karte[t]; t.clear(); t += s[2]; t += s[3]; t += s[0]; t += s[1]; erg -= karte[t]; ////////////////////////////////////////////////////// t.clear(); t += s[3]; t += s[1]; t += s[2]; t += s[3]; erg -= linkob[t]; // cout << erg << "\n"; t.clear(); t += s[2]; t += s[3]; t += s[0]; t += s[2]; erg -= obrech[t]; t.clear(); t += s[0]; t += s[2]; t += s[1]; t += s[0]; erg -= rechun[t]; t.clear(); t += s[1]; t += s[0]; t += s[3]; t += s[1]; erg -= untlink[t]; ////////////////////////////////////////////////////// upd karte[s]++; t.clear(); t += s[0]; t += s[2]; links[t]++; t.clear(); t += s[1]; t += s[3]; rechts[t]++; t.clear(); t += s[0]; t += s[1]; ob[t]++; t.clear(); t += s[2]; t += s[3]; un[t]++; //////////////////////////////////////////////////////up3 t.clear(); t += s[2]; t += s[0]; t += s[0]; t += s[1]; // cout << "suii " << t << "\n"; linkob[t]++; t.clear(); t += s[0]; t += s[1]; t += s[1]; t += s[3]; obrech[t]++; t.clear(); t += s[1]; t += s[3]; t += s[3]; t += s[2]; rechun[t]++; t.clear(); t += s[3]; t += s[2]; t += s[2]; t += s[0]; untlink[t]++; // cout << erg << "\n"; } cout << erg<< "\n"; }

컴파일 시 표준 에러 (stderr) 메시지

korteles.cpp: In function 'int main()':
korteles.cpp:15:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |       for(int j = 0 ; j < t.size() ; j++){
      |                       ~~^~~~~~~~~~
korteles.cpp:9:22: warning: unused variable 'numm' [-Wunused-variable]
    9 |    long long menge , numm , nummer , len, erg = 0;
      |                      ^~~~
korteles.cpp:9:29: warning: unused variable 'nummer' [-Wunused-variable]
    9 |    long long menge , numm , nummer , len, erg = 0;
      |                             ^~~~~~
korteles.cpp:9:38: warning: unused variable 'len' [-Wunused-variable]
    9 |    long long menge , numm , nummer , len, erg = 0;
      |                                      ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...