| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1353798 | mariza | Splits (CEOI25_splits) | C++20 | 990 ms | 1114112 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD=998244353;
int solve(int n, int m, vector<vector<int>>& s){
int ans=0;
vector<vector<ll>> a1;
a1.push_back(vector<ll>());
for(ll i=1; i<=n; i++){
a1[0].push_back(i);
}
for(ll k=0; k<(1ll<<n); k++){
// cout<<k<<endl;
vector<ll> x;
for(ll i=0; i<n; i++){
if(k&(1ll<<i)) x.push_back(i);
}
for(ll i=0; i<n; i++){
if((k&(1ll<<i))==0) x.push_back(i);
}
bool ok=0;
for(ll i=0; i<n; i++){
if(x[i]!=i) ok=1;
}
// cout<<k<<endl;
if(ok){
a1.push_back(vector<ll>());
for(ll i=0; i<n; i++){
a1.back().push_back(s[0][x[i]]);
}
}
}
for(auto a:a1){
bool ok=1;
for(ll i=0; i<m; i++){
ll c=0, idx=0;
for(ll j=0; j<n; j++){
while(s[i][j]!=a[idx]){
idx++;
if(idx==n){
c++;
idx=0;
}
}
}
if(c>=2){
ok=0;
break;
}
}
if(ok) ans++;
}
return ans;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
