답안 #795286

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
795286 2023-07-27T08:07:45 Z vjudge1 Council (JOI23_council) C++17
22 / 100
4000 ms 10560 KB
#define Magic ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define tsts int t; cin >> t; while(t--)
#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
using ull = unsigned long long int;
using ld = long double;
using str = string;
#define pb push_back
#define pf push_front
#define sz size()
#define bg begin()
#define ers erase
inline void debugMode() {
    #ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    #endif // ONLINE_JUDGE
}
const int N = 3e5 + 100, M = 20;
str cur;
int n, m, k[M], ans, sum[M], cnt1 = 0;
map <str, int> cnt;
vector <str> v;
str x[N];
void recur(str s){
	if (s.sz == m){
		v.pb(s);
	}
	else{
		s+='1';
		recur(s);
		s.pop_back();
		s+='0';
		recur(s);
	}
} 
int main(){
    Magic
    //debugMode();
    cin >> n >> m;
    for (int i = 0 ; i < n ; i++){
    	for (int j = 0 ; j < m ; j++){
    		char a;
    		cin >> a;
    		x[i]+=a;
    		if (a == '1'){
    			sum[j]++;
    		}
    		else{
    			sum[j]--;
    		}
    		k[j] = sum[j];
    	}
    	cnt[x[i]]++;
    }
    if (n <= 3000){
    	for (int i = 0 ; i < n ; i++){
    		int ans = 0;
    		for (int j = 0 ; j < n ; j++){
    			int k = 0;
    			if (i == j)
    				continue ;
    			int sum1[m];
    			for (int z = 0 ; z < m ; z++){
    				sum1[z] = sum[z];
    			}
    			for (int z = 0 ; z < m ; z++){
    				if (x[i][z] == '1')
    					sum1[z]--;
    				else
    					sum1[z]++;
    				if (x[j][z] == '1')
    					sum1[z]--;
    				else
    					sum1[z]++;
    				if (sum1[z] > 0)
    					k++;
    				//cout << sum1[z] << " ";
    			}
    			ans = max(ans, k);
    		}
    	cout << ans << "\n";
    	}
    	return 0;
    }
    str s1;
    recur(s1);
    //cout << v.sz << "\n";
    for (int i = 0 ; i < n ; i++){
    	ans = 0;
    	for (auto it : v){
    		if (cnt[it] > (it == x[i])){
    			int k = 0;
    			for (int z = 0 ; z < m ; z++){
    				if (x[i][z] == '1')
    					sum[z]--;
    				else
    					sum[z]++;
    				if (it[z] == '1')
    					sum[z]--;
    				else
    					sum[z]++;
    				if (sum[z] > 0)
    					k++;
    				if (x[i][z] == '0')
    					sum[z]--;
    				else
    					sum[z]++;
    				if (it[z] == '0')
    					sum[z]--;
    				else
    					sum[z]++;
    				//cout << sum1[z] << " ";
    			}
    			ans = max(ans, k);
    		}
    	}
    	cout << ans << "\n";
    }
}
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠤⢲⣦⡀⠀⣠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣠⠖⠚⠓⠒⠒⠲⠿⣍⣛⣻⣦⣷⢠⣻⣀⠤⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠔⡿⠓⠲⠬⢥⡤⠤⠤⠤⠤⣤⣀⣀⣈⣻⣿⣿⠓⠉⣀⡤⠔⢶⣻⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⢤⠞⠁⣼⠀⠀⠀⠀⠀⠀⠰⠶⢌⣽⡶⠟⢏⡁⢈⣉⣭⣷⡯⣝⠒⢦⣄⠙⠷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡾⣵⠿⣳⡟⠉⠉⠿⠀⠀⡀⠀⠀⣀⣀⣢⣾⣿⡚⠓⠒⠒⠒⠻⢿⣟⣧⡀⢠⣢⡻⠙⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⢿⣟⣲⢿⣷⢀⣤⣠⣄⣈⢿⣷⣤⣷⣻⡓⠒⠻⠭⢷⡄⠒⠲⢶⣦⣬⣻⣏⢦⡈⢿⣆⠘⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⢖⣩⠷⢎⣙⣿⣿⣼⡼⣿⣟⣽⣻⢯⢿⠞⣌⠙⢳⡕⠀⠙⠲⣶⠤⢄⡠⣄⡈⠛⣿⣿⣧⢳⣌⢻⡆⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠗⠉⢀⣾⠟⠒⡿⣫⡿⡾⢫⢟⡏⠉⢸⡀⠑⢾⡆⢤⣻⣶⣤⣘⣲⣿⣶⡽⠿⣯⠲⣌⣇⢹⣷⣿⣆⠸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⡼⠀⣿⢣⣧⠋⣸⠀⣰⢀⣿⣆⠀⠰⣄⠙⣧⣨⣿⣿⣿⣯⣿⣦⠘⣷⡌⢻⡄⠿⣆⠟⣆⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⡇⡼⣹⠈⢣⠆⡇⣰⣻⣼⣿⣽⣷⣦⣹⣿⣟⣯⠉⠘⣿⠏⠃⠀⣷⣽⡿⣾⡹⣷⣹⣧⡈⢺⡀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⢾⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⣷⣱⣽⡀⢸⣆⢳⣿⣇⣷⡿⠖⠿⠷⢦⣙⣆⠩⡗⠀⠀⠀⠀⠀⡯⠿⠳⣟⠻⣽⣄⢧⠈⠳⣷⡀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡇⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣿⣿⣷⣸⣿⡀⣿⣅⠛⠇⠀⠀⠀⠀⢈⠙⠂⠀⠀⠀⠀⠀⣸⣿⠀⢠⣜⢦⠘⢿⣮⣷⡀⠀⠙⢦⡀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⢯⣇⠙⢄⣀⠀⠀⠀⢀⣀⡠⣴⣾⣫⠵⠛⣿⣻⠿⣷⣹⣾⣷⡠⡀⠀⠀⠀⠻⠦⠀⣀⠔⠀⠀⣴⣿⣸⣧⡀⠳⣝⠳⢴⡙⢞⣏⠢⡀⠀⠹⡄⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⢀⣀⣀⣈⣻⣤⣀⠈⠉⠻⠿⢿⣺⣿⡵⣶⢶⣦⠀⠘⣿⢷⣾⢿⣿⡋⢙⣮⣄⡀⠀⠀⠉⠈⠀⠀⢀⢞⣿⣼⣿⣿⣿⣆⡀⠙⢦⣝⣮⠛⢷⡙⢆⠀⣷⠀⠀⠀⠀
///⠀⠀⠀⢠⡴⢟⣫⠤⠖⠒⠛⢛⣲⣿⣿⣿⠟⠋⢱⣿⣴⣷⣿⣹⢃⣀⣘⠃⢩⢿⣫⣥⣿⠧⢿⣿⣗⡶⣤⣄⣀⣴⣷⣻⣿⣿⠻⠘⣏⠛⢿⣦⣀⠱⢤⣉⡑⠛⠮⢿⣹⠀⠀⠀⠀
///⠀⢠⢖⠵⠊⠁⢀⡤⠖⣲⣿⣿⣟⣻⣿⣋⠀⠀⠈⢿⣿⡿⠟⣵⣿⣿⣿⣷⡏⠈⢿⡿⣷⣤⣼⢿⣿⣿⢶⣯⣭⣵⣾⢿⣿⠿⢦⡀⢹⠀⠈⣏⠉⠉⢻⣶⣯⡑⠦⣄⠈⠳⣄⠀
///⠀⠹⠁⠀⠀⣞⢁⡾⢽⣯⣝⣛⣛⣯⣭⣽⣿⣷⣶⣤⣤⣴⣿⣿⣿⣿⣿⣿⡀⣀⣼⣀⠈⠙⠛⠷⣾⡿⢿⡟⣿⠟⠁⣈⣥⡴⠾⠷⢾⡄⠀⣿⠀⠀⠈⢇⠘⣿⣤⣀⠑⢦⡘⢧⠀
///⠄⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⡿⠛⣻⢏⡽⣯⡄⠘⣏⣿⡏⠈⠙⠓⠶⣤⣀⠀⠙⢿⣿⡇⢀⡿⠋⠁⠀⢀⣀⣸⡇⠀⣟⣀⠀⠀⠀⠙⠃⣿⡎⠑⣤⡙⣌⡇
///⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⡥⣖⡯⠖⢋⣡⡞⣼⣿⠀⠀⢹⣿⣷⠀⠀⣀⡀⠀⠉⠻⣦⠀⢿⣿⡿⠁⣠⡶⠟⠋⠉⠹⣆⣸⣿⣿⠀⣀⡤⣤⡀⣿⠇⠀⢸⠳⡜⡇
///⠀⠀⠀⠀⠀⠀⠀⠀⣈⣿⣿⣿⣿⣿⣿⣏⢿⣗⠒⠊⠉⢸⠁⡿⡏⠀⢀⣿⡿⣁⠤⢶⣿⣽⡆⠀⠀⠘⢷⡈⠉⣡⠾⠋⠀⠀⣠⣆⢠⣿⣿⣿⡟⢀⣷⠒⢺⣧⡏⠀⠀⢸⠀⢹⣹
///⠀⠀⠀⠀⠀⠀⡠⢪⠟⡽⠙⢶⣾⣿⣿⣿⣷⡻⣦⡀⠀⠀⢣⣇⡇⢀⡞⣸⠏⠁⠀⠀⡇⢻⡀⠀⠀⣾⣶⡟⣿⣥⡄⠀⠀⢠⣇⣼⡶⣿⣿⠋⣸⣾⣷⣚⣽⡟⠀⠀⠀⣏⠀⡼⣿
///⠀⠀⠀⠀⢀⠎⡴⣣⣾⠟⣡⠞⢹⡿⣿⢿⣿⣿⣿⣷⣄⠀⠈⠻⡹⣼⠀⣿⡄⠀⠀⠀⠉⠻⣷⡀⠀⠙⠿⠇⣿⠿⠇⠀⠀⢠⡿⠋⢇⢹⣟⢷⠫⣿⣟⡿⠋⠀⠀⣠⣾⢞⡜⠁⡿
///⠀⠀⠀⠀⡼⡼⣵⠏⡏⣰⠃⠀⢾⡇⠈⠻⣿⣮⡉⠹⣿⣧⣄⡀⠙⣇⠀⠸⣿⣄⡀⠀⠀⠀⠈⢉⣧⡴⠀⠠⡄⣀⡤⠤⠴⠋⠁⠀⠈⢻⣿⣾⣤⡿⠋⠀⠀⠀⣉⣽⠿⠋⠀⣰⠃
///⠀⠀⠀⠀⣿⣽⠋⠀⡇⡇⠀⠀⠘⣷⢠⣶⢮⣻⣿⣦⠈⠛⠙⠹⣷⠘⢦⣤⣿⣳⣭⣑⣒⣒⣺⣿⢿⣀⣀⣀⣿⣧⣀⣀⣀⡤⠴⠒⣶⣿⣏⣾⡿⠁⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⢻⡏⠀⠀⢳⣇⠀⠀⠀⠈⠈⣿⣾⣿⣿⣮⣿⣦⠀⠀⢿⣶⡫⣿⣿⣿⣿⣿⡹⣯⣊⠁⠉⠉⠉⠉⢙⣮⣷⣶⡤⣤⣶⣿⣿⣟⣾⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠸⣿⣦⡀⠀⠙⠦⠀⠀⢀⣼⠿⣽⣿⣯⣷⣼⡷⢾⣻⣾⣿⠞⢿⢻⡷⠻⣿⣏⡙⢝⣻⡾⡖⠒⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣎⠣⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⣴⣋⣉⣩⣿⣿⢿⣟⣷⣾⣯⡟⢱⡇⠀⠘⣿⠣⡀⣈⣻⣿⣿⣿⣷⣷⣶⣿⣿⣟⠋⡿⣹⣿⣿⣿⣿⢟⣏⠺⠿⠶⠭⠷⠂⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⢹⣮⣾⣿⡿⢋⣶⢸⡇⠀⠀⠈⢷⡑⠈⢻⣟⠛⠛⠿⠋⠙⠓⣭⣿⣹⣵⣿⣿⣿⣿⣿⠈⠻⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢟⣛⡭⠶⢾⡿⠃⠀⠀⢸⢹⣾⣇⠀⠀⠀⠀⠻⣟⣿⡏⠀⠀⠀⠀⢰⣿⣿⢿⡇⣿⣿⣿⣿⣟⡏⠀⠀⠀⠉⠙⠓⠒⠂⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡟⠀⠀⠀⢰⣿⢸⣿⢿⡀⠀⠀⠀⠀⢸⣿⣣⠀⠀⠀⢠⣿⡟⣷⣾⣿⢿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⠁⠀⠀⠀⠘⡿⡿⢿⣏⣧⠀⠀⠀⢀⣾⣿⠿⠀⢀⣴⣿⣿⢿⡹⡇⣿⠈⣿⣿⡟⣾⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡇⠀⠀⠀⠀⢳⢧⠈⢿⣿⠀⠀⢀⣼⣿⠕⠁⣠⣾⡿⣻⠏⠀⢹⣹⣿⣆⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣷⠀⠀⠀⠀⠈⣏⢧⠀⢻⣧⠶⣋⠿⠋⣀⣾⣟⣿⠞⠁⠀⠀⠀⢯⣿⣿⣿⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣇⠀⠀⠀⠀⠸⡜⣆⠈⢷⣿⠀⢠⣾⣿⠟⢻⡏⠀⠀⠀⠀⠀⠘⣿⣿⠏⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡻⣿⣿⣦⡀⠀⠀⠀⢧⠘⣆⠈⢷⠒⠛⢻⡿⠄⠘⣧⠀⠀⠀⠀⠀⢰⣷⣹⠀⠙⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣷⣝⣿⣿⣷⣄⠀⠀⠈⢇⠸⡄⠈⣇⠀⠀⢻⣆⠀⠘⣇⠀⠀⣠⣾⣽⢹⡟⠀⢰⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣾⢻⠙⢿⣿⡇⠀⠀⠈⢧⢳⠀⢸⡀⠀⠀⢻⣆⠀⢻⡄⢠⣿⣯⣽⣓⣧⣤⠾⢹⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣼⡇⠀⠙⣿⠀⠀⠀⠈⢏⢧⠀⣇⠀⠀⠀⢻⣆⠀⢷⠘⣿⣮⡻⣿⠁⠀⢀⣯⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠘⡾⡄⢸⠀⠀⠀⠈⢻⣆⠈⢷⣷⣾⣟⣻⣶⣿⡿⠛⢿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀⢳⣇⠘⡆⠀⠀⠀⠀⠻⣶⢺⡏⢹⡟⠀⠉⠁⠀⠀⠀⢩⣍⠙⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣟⣿⣿⣿⣧⠀⢀⣤⣤⡸⣸⠀⡇⠀⠀⠀⠀⠀⠙⣿⣷⢡⣿⣶⣄⠀⠀⣄⠀⣦⣍⠙⢳⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡿⢿⡙⠿⠀⢸⡟⢲⣷⡿⡄⢿⠀⠀⠀⠀⠀⠀⠘⣏⢸⣇⣍⢻⣷⣀⢻⣦⣤⣌⡙⣦⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣯⢷⠀⠀⠸⡇⠀⢿⣧⡇⢸⠀⠀⠀⠀⠀⠀⠀⣼⢸⣿⣯⠀⣿⣿⣷⣝⣿⣻⣿⣼⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣎⣧⠀⠐⣇⠀⠘⣽⣿⡸⡆⠀⠀⠀⠀⠀⠀⠈⠋⠈⠻⣼⣿⢶⢿⣿⣯⡻⣿⣿⣾⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡼⡆⠀⣿⡀⠀⣿⢿⡇⢷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣾⢧⠈⠙⠿⣮⠟⠉⠙⢦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⢻⢠⣿⡇⠀⠹⣄⢳⣜⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡏⠪⠳⢤⣄⣀⠀⠀⠀⠈⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣎⣿⡟⡇⠀⠀⠈⢻⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢳⡄⠀⠀⠀⠙⢧⡀⢀⡄⠈⡇⠀⠀⠀⠀⠀⠀⠀⠀

Compilation message

council.cpp: In function 'void recur(str)':
council.cpp:27:11: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   27 |  if (s.sz == m){
      |      ~~~~~^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 4 ms 9716 KB Output is correct
5 Correct 4 ms 9684 KB Output is correct
6 Correct 8 ms 9724 KB Output is correct
7 Correct 4 ms 9684 KB Output is correct
8 Correct 4 ms 9684 KB Output is correct
9 Correct 18 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9720 KB Output is correct
12 Correct 18 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9720 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9720 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9724 KB Output is correct
19 Correct 4 ms 9720 KB Output is correct
20 Correct 4 ms 9684 KB Output is correct
21 Correct 5 ms 9716 KB Output is correct
22 Correct 5 ms 9716 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 5 ms 9716 KB Output is correct
26 Correct 6 ms 9684 KB Output is correct
27 Correct 5 ms 9684 KB Output is correct
28 Correct 4 ms 9684 KB Output is correct
29 Correct 4 ms 9676 KB Output is correct
30 Correct 4 ms 9716 KB Output is correct
31 Correct 13 ms 9684 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9720 KB Output is correct
34 Correct 4 ms 9684 KB Output is correct
35 Correct 8 ms 9716 KB Output is correct
36 Correct 5 ms 9684 KB Output is correct
37 Correct 4 ms 9716 KB Output is correct
38 Correct 5 ms 9724 KB Output is correct
39 Correct 4 ms 9680 KB Output is correct
40 Correct 12 ms 9748 KB Output is correct
41 Correct 4 ms 9724 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9728 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 5 ms 9720 KB Output is correct
47 Correct 6 ms 9612 KB Output is correct
48 Correct 4 ms 9716 KB Output is correct
49 Correct 5 ms 9660 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 4 ms 9716 KB Output is correct
5 Correct 4 ms 9684 KB Output is correct
6 Correct 8 ms 9724 KB Output is correct
7 Correct 4 ms 9684 KB Output is correct
8 Correct 4 ms 9684 KB Output is correct
9 Correct 18 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9720 KB Output is correct
12 Correct 18 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9720 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9720 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9724 KB Output is correct
19 Correct 4 ms 9720 KB Output is correct
20 Correct 4 ms 9684 KB Output is correct
21 Correct 5 ms 9716 KB Output is correct
22 Correct 5 ms 9716 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 5 ms 9716 KB Output is correct
26 Correct 6 ms 9684 KB Output is correct
27 Correct 5 ms 9684 KB Output is correct
28 Correct 4 ms 9684 KB Output is correct
29 Correct 4 ms 9676 KB Output is correct
30 Correct 4 ms 9716 KB Output is correct
31 Correct 13 ms 9684 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9720 KB Output is correct
34 Correct 4 ms 9684 KB Output is correct
35 Correct 8 ms 9716 KB Output is correct
36 Correct 5 ms 9684 KB Output is correct
37 Correct 4 ms 9716 KB Output is correct
38 Correct 5 ms 9724 KB Output is correct
39 Correct 4 ms 9680 KB Output is correct
40 Correct 12 ms 9748 KB Output is correct
41 Correct 4 ms 9724 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9728 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 5 ms 9720 KB Output is correct
47 Correct 6 ms 9612 KB Output is correct
48 Correct 4 ms 9716 KB Output is correct
49 Correct 5 ms 9660 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 299 ms 9960 KB Output is correct
52 Correct 270 ms 9960 KB Output is correct
53 Correct 1256 ms 10304 KB Output is correct
54 Correct 1258 ms 10308 KB Output is correct
55 Correct 128 ms 9684 KB Output is correct
56 Correct 1056 ms 10272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 64 ms 10540 KB Output is correct
3 Correct 63 ms 10472 KB Output is correct
4 Correct 42 ms 10560 KB Output is correct
5 Correct 75 ms 10496 KB Output is correct
6 Correct 45 ms 10560 KB Output is correct
7 Correct 76 ms 10548 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 4 ms 9684 KB Output is correct
11 Correct 4 ms 9724 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9720 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 125 ms 9712 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 64 ms 10540 KB Output is correct
3 Correct 63 ms 10472 KB Output is correct
4 Correct 42 ms 10560 KB Output is correct
5 Correct 75 ms 10496 KB Output is correct
6 Correct 45 ms 10560 KB Output is correct
7 Correct 76 ms 10548 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 4 ms 9684 KB Output is correct
11 Correct 4 ms 9724 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9720 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 125 ms 9712 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4105 ms 10392 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 64 ms 10540 KB Output is correct
3 Correct 63 ms 10472 KB Output is correct
4 Correct 42 ms 10560 KB Output is correct
5 Correct 75 ms 10496 KB Output is correct
6 Correct 45 ms 10560 KB Output is correct
7 Correct 76 ms 10548 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 4 ms 9684 KB Output is correct
11 Correct 4 ms 9724 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9720 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 125 ms 9712 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4105 ms 10392 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 64 ms 10540 KB Output is correct
3 Correct 63 ms 10472 KB Output is correct
4 Correct 42 ms 10560 KB Output is correct
5 Correct 75 ms 10496 KB Output is correct
6 Correct 45 ms 10560 KB Output is correct
7 Correct 76 ms 10548 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 4 ms 9684 KB Output is correct
11 Correct 4 ms 9724 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9720 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 125 ms 9712 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4105 ms 10392 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 4 ms 9716 KB Output is correct
5 Correct 4 ms 9684 KB Output is correct
6 Correct 8 ms 9724 KB Output is correct
7 Correct 4 ms 9684 KB Output is correct
8 Correct 4 ms 9684 KB Output is correct
9 Correct 18 ms 9684 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 5 ms 9720 KB Output is correct
12 Correct 18 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9720 KB Output is correct
15 Correct 5 ms 9684 KB Output is correct
16 Correct 5 ms 9720 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9724 KB Output is correct
19 Correct 4 ms 9720 KB Output is correct
20 Correct 4 ms 9684 KB Output is correct
21 Correct 5 ms 9716 KB Output is correct
22 Correct 5 ms 9716 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 5 ms 9716 KB Output is correct
26 Correct 6 ms 9684 KB Output is correct
27 Correct 5 ms 9684 KB Output is correct
28 Correct 4 ms 9684 KB Output is correct
29 Correct 4 ms 9676 KB Output is correct
30 Correct 4 ms 9716 KB Output is correct
31 Correct 13 ms 9684 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9720 KB Output is correct
34 Correct 4 ms 9684 KB Output is correct
35 Correct 8 ms 9716 KB Output is correct
36 Correct 5 ms 9684 KB Output is correct
37 Correct 4 ms 9716 KB Output is correct
38 Correct 5 ms 9724 KB Output is correct
39 Correct 4 ms 9680 KB Output is correct
40 Correct 12 ms 9748 KB Output is correct
41 Correct 4 ms 9724 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9728 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 5 ms 9720 KB Output is correct
47 Correct 6 ms 9612 KB Output is correct
48 Correct 4 ms 9716 KB Output is correct
49 Correct 5 ms 9660 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 299 ms 9960 KB Output is correct
52 Correct 270 ms 9960 KB Output is correct
53 Correct 1256 ms 10304 KB Output is correct
54 Correct 1258 ms 10308 KB Output is correct
55 Correct 128 ms 9684 KB Output is correct
56 Correct 1056 ms 10272 KB Output is correct
57 Correct 4 ms 9684 KB Output is correct
58 Correct 64 ms 10540 KB Output is correct
59 Correct 63 ms 10472 KB Output is correct
60 Correct 42 ms 10560 KB Output is correct
61 Correct 75 ms 10496 KB Output is correct
62 Correct 45 ms 10560 KB Output is correct
63 Correct 76 ms 10548 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9684 KB Output is correct
66 Correct 4 ms 9684 KB Output is correct
67 Correct 4 ms 9724 KB Output is correct
68 Correct 5 ms 9684 KB Output is correct
69 Correct 5 ms 9720 KB Output is correct
70 Correct 5 ms 9684 KB Output is correct
71 Correct 5 ms 9684 KB Output is correct
72 Correct 5 ms 9684 KB Output is correct
73 Correct 125 ms 9712 KB Output is correct
74 Correct 5 ms 9684 KB Output is correct
75 Correct 4 ms 9684 KB Output is correct
76 Execution timed out 4105 ms 10392 KB Time limit exceeded
77 Halted 0 ms 0 KB -