# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
381426 | BilAktauAlmansur | ZigZag (COCI17_zigzag) | C++17 | 283 ms | 6484 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main () {
int a, b;
cin>>a>>b;
vector <string> s;
vector <char> s1;
for (int i=0; i<a; i++) {
string s2;
cin>>s2;
s.push_back(s2);
}
for (int i=0; i<b; i++) {
char ch;
cin>>ch;
s1.push_back(ch);
}
for (int i=0; i<b; i++) {
if (s1[i]==s[i][0]) {
cout << s[i] << endl;
}
else {
cout << s[i+1] << endl;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |