# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
153773 | BabinSinko | Tavan (COCI16_tavan) | C++14 | 3 ms | 504 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
#include <ctime>
#include <string.h>
#include <algorithm>
#include <vector>
using namespace std;
long long n, m, k, x, nm, a, l;
vector<long long> key;
string s, sc;
char c[503][29];
int main(){
cin >> n >> m >> k >> x;
cin >> s;
a = x;
for (int i = 0; i < m; i++){
cin >> sc;
strcpy(c[i], sc.c_str());
sort(c[i], c[i] + k);
if (a != 0){
key.push_back ((a % (k + 1)) - 1);
a = a / (k+1);
}
if (a == 0){
key.push_back (0);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |