| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1339447 | vjudge1 | Parametriziran (COCI19_parametriziran) | C++20 | 3095 ms | 504 KiB |
#include <bits/stdc++.h>
using namespace std;
char ch[6][50001];
int main(){
int n, m, ans = 0;
cin >> n >> m;
/*
map<string, int> fr[64];
for(int i = 1; i <= n; i++){
string s, ss = "";
cin >> s;
int mask = 0;
for(int j = 0; j < m; j++){
if(s[j] != '?'){
mask ^= 1 << j;
ss += s[j];
}
}
for(int mask2 = 0; mask2 < 1 << m; mask2++){
string s2 = "";
for(int j = 0; j < m; j++){
if((mask2 & (1 << j)) && (mask & (1 << j)))
s2[j] = s[j];
else
s2[j]
}
ans += fr[mask2][s2];
}
fr[mask][ss]++;
}
*/
for(int i = 1; i <= n; i++){
for(int j = 0; j < m; j++){
cin >> ch[j][i];
}
for(int j = 1; j < i; j++){
bool ok = 0;
for(int z = 0; z < m && !ok; z++){
ok |= (ch[z][i] != '?' && ch[z][j] != '?' && ch[z][i] != ch[z][j]);
}
ans += 1 - ok;
}
}
cout << ans << '\n';
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
