Submission #182404

#TimeUsernameProblemLanguageResultExecution timeMemory
182404XmtosXKartomat (COCI17_kartomat)C++17
80 / 80
2 ms376 KiB
#include <bits/stdc++.h> using namespace std; string ans="*******************************************",a; vector <string> s; int n; void fin() { for (int i=0;i<4;i++) { for (int j=0;j<8;j++) cout <<ans[j+i*8]; cout <<endl; } } int main() { cin >>n; for (int i=0;i<n;i++) { cin >>a; s.push_back(a); } cin >>a; for (int i=0;i<s.size();i++) { if (s[i].size()<=a.size()||s[i].substr(0,a.size())!=a) { s.erase(s.begin()+i); i--; } } for (int i=0;i<s.size();i++) { ans[s[i][a.size()]-'A'+3]=s[i][a.size()]; } fin(); return 0; }

Compilation message (stderr)

kartomat.cpp: In function 'int main()':
kartomat.cpp:24:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i=0;i<s.size();i++)
                  ~^~~~~~~~~
kartomat.cpp:32:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i=0;i<s.size();i++)
                  ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...