Submission #73099898
Source Code Expand
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
#define LA 1000000
//昇順sort(a.begin(), a.end());
//降順sort(a.begin(), a.end(), greater<int>());
//aCb
int com(int a, int b){
int ue = 1;
int sita = 1;
for(int i = 0; i < b; i++){
ue *= (a-i);
}
for(int i = 1; i < b+1; i++){
sita *= i;
}
return ue/sita;
}
int main(){
int N;
cin >> N;
vector<int> A(N);
rep(i, N){
cin >> A.at(i);
}
sort(A.begin(), A.end());
vector<int> B(A.at(N-1));
rep(i, N){
for(int j = 0; j < A.at(i); j++){
B.at(j)++;
}
}
rep(i, A.at(N-1)){
if(B.at(i) >= 10){
B.at(i) = 0;
B.at(i+1)++;
}
}
for(int i = A.at(N-1)-1; i >= 0; i--){
cout << B.at(i);
}
cout << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | D - Many Repunit Sum |
| User | shishitogarasi |
| Language | C++23 (GCC 15.2.0) |
| Score | 0 |
| Code Size | 828 Byte |
| Status | RE |
| Exec Time | > 2000 ms |
| Memory | 5064 KiB |
Judge Result
| Set Name | Sample | All | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 400 | ||||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 0_sample_1.txt, 0_sample_2.txt, 0_sample_3.txt |
| All | 0_sample_1.txt, 0_sample_2.txt, 0_sample_3.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt, 1_15.txt, 1_16.txt, 1_17.txt, 1_18.txt, 1_19.txt, 1_20.txt, 2_1.txt, 2_2.txt, 2_3.txt, 2_4.txt, 2_5.txt, 2_6.txt, 2_7.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 0_sample_1.txt | AC | 2 ms | 3452 KiB |
| 0_sample_2.txt | AC | 2 ms | 3580 KiB |
| 0_sample_3.txt | AC | 1 ms | 3452 KiB |
| 1_01.txt | TLE | > 2000 ms | 4816 KiB |
| 1_02.txt | TLE | > 2000 ms | 4912 KiB |
| 1_03.txt | TLE | > 2000 ms | 4912 KiB |
| 1_04.txt | TLE | > 2000 ms | 4912 KiB |
| 1_05.txt | TLE | > 2000 ms | 4820 KiB |
| 1_06.txt | TLE | > 2000 ms | 4824 KiB |
| 1_07.txt | TLE | > 2000 ms | 5064 KiB |
| 1_08.txt | TLE | > 2000 ms | 4912 KiB |
| 1_09.txt | TLE | > 2000 ms | 4700 KiB |
| 1_10.txt | TLE | > 2000 ms | 4980 KiB |
| 1_11.txt | TLE | > 2000 ms | 4812 KiB |
| 1_12.txt | TLE | > 2000 ms | 4948 KiB |
| 1_13.txt | TLE | > 2000 ms | 4824 KiB |
| 1_14.txt | TLE | > 2000 ms | 5040 KiB |
| 1_15.txt | TLE | > 2000 ms | 4920 KiB |
| 1_16.txt | TLE | > 2000 ms | 4700 KiB |
| 1_17.txt | TLE | > 2000 ms | 4828 KiB |
| 1_18.txt | TLE | > 2000 ms | 4812 KiB |
| 1_19.txt | TLE | > 2000 ms | 4816 KiB |
| 1_20.txt | TLE | > 2000 ms | 4936 KiB |
| 2_1.txt | RE | 134 ms | 4424 KiB |
| 2_2.txt | RE | 132 ms | 4424 KiB |
| 2_3.txt | TLE | > 2000 ms | 4800 KiB |
| 2_4.txt | TLE | > 2000 ms | 4400 KiB |
| 2_5.txt | AC | 1 ms | 3456 KiB |
| 2_6.txt | AC | 7 ms | 4068 KiB |
| 2_7.txt | AC | 4 ms | 3788 KiB |