Submission #25927380
Source Code Expand
#include <bits/stdc++.h>
#define ll long long
#define ft first
#define sec second
#define pb push_back
#define pf push_front
#define pr pair<ll,ll>
#define bged(a) a.begin(),a.end()
#define ISCC ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#pragma optimize("Ofast","unroll-loop")
using namespace std;
const int MOD = 1e9+7;
int t ,n ,m ,k;
string a[5] ,s ,ans;
int main()
{
for(int i=1 ;i<=3 ;i++) cin >> a[i];
cin >> s;
for(int i=0 ;i<s.size() ;i++)
ans += a[s[i]-'0'];
cout << ans;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Maritozzo |
| User | ck1080012 |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 531 Byte |
| Status | AC |
| Exec Time | 9 ms |
| Memory | 3644 KiB |
Compile Error
./Main.cpp:10: warning: ignoring #pragma optimize [-Wunknown-pragmas]
10 | #pragma optimize("Ofast","unroll-loop")
|
./Main.cpp: In function ‘int main()’:
./Main.cpp:19:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
19 | for(int i=0 ;i<s.size() ;i++)
| ~^~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_00, example_01, example_02 |
| All | example_00, example_01, example_02, test_00, test_01, test_02, test_03, test_04, test_05, test_06 |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| example_00 | AC | 9 ms | 3568 KiB |
| example_01 | AC | 2 ms | 3516 KiB |
| example_02 | AC | 2 ms | 3624 KiB |
| test_00 | AC | 3 ms | 3556 KiB |
| test_01 | AC | 2 ms | 3644 KiB |
| test_02 | AC | 3 ms | 3472 KiB |
| test_03 | AC | 6 ms | 3596 KiB |
| test_04 | AC | 2 ms | 3608 KiB |
| test_05 | AC | 3 ms | 3596 KiB |
| test_06 | AC | 2 ms | 3576 KiB |