Submission #67524755
Source Code Expand
#include<bits/stdc++.h>
#define int long long
const int inf = 1e9;
using namespace std;
long long mini(long long a , long long b)
{
if(a < b)
return a;
return b;
}
int32_t main(void)
{
int n;
cin >> n;
string ans = "";
bool toLong = false;
while(n--)
{
char ch;
long long l;
cin >> ch;
cin >> l;
if(toLong)
continue;
string temp = "";
for(long long i = 0 ; i < mini(101 , l) ; i++)
temp += ch;
ans += temp;
if(ans.size() > 100)
{
ans = "Too Long";
toLong = true;
}
}
cout << ans << "\n";
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - String Too Long |
| User | Sarthak_Borse |
| Language | C++ 20 (gcc 12.2) |
| Score | 200 |
| Code Size | 637 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3564 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_00.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3492 KiB |
| 00_sample_01.txt | AC | 1 ms | 3428 KiB |
| 00_sample_02.txt | AC | 1 ms | 3456 KiB |
| 00_sample_03.txt | AC | 1 ms | 3424 KiB |
| 01_test_00.txt | AC | 1 ms | 3520 KiB |
| 01_test_01.txt | AC | 1 ms | 3452 KiB |
| 01_test_02.txt | AC | 1 ms | 3440 KiB |
| 01_test_03.txt | AC | 1 ms | 3488 KiB |
| 01_test_04.txt | AC | 1 ms | 3564 KiB |
| 01_test_05.txt | AC | 1 ms | 3524 KiB |
| 01_test_06.txt | AC | 1 ms | 3428 KiB |
| 01_test_07.txt | AC | 1 ms | 3444 KiB |
| 01_test_08.txt | AC | 1 ms | 3452 KiB |
| 01_test_09.txt | AC | 1 ms | 3456 KiB |
| 01_test_10.txt | AC | 1 ms | 3448 KiB |
| 01_test_11.txt | AC | 1 ms | 3476 KiB |
| 01_test_12.txt | AC | 1 ms | 3480 KiB |
| 01_test_13.txt | AC | 1 ms | 3444 KiB |
| 01_test_14.txt | AC | 1 ms | 3564 KiB |
| 01_test_15.txt | AC | 1 ms | 3492 KiB |
| 01_test_16.txt | AC | 1 ms | 3428 KiB |
| 01_test_17.txt | AC | 1 ms | 3448 KiB |