답안 #795201

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
795201 2023-07-27T07:27:15 Z vjudge1 Council (JOI23_council) C++17
22 / 100
4000 ms 10680 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;
str x[N];
void recur(str s){
	if (s.sz == m){
		if (cnt[s] > (cur == s)){
			cnt1 = 0;
			//cout << s << "\n";
			for (int i = 0 ; i < m ; i++){
				if (s[i] == '1')
					k[i]--;
				else
					k[i]++;
				if (k[i] > 0)
					cnt1++;
				if (s[i] == '1')
					k[i]++;
				else
					k[i]--;
			}
			ans = max(ans, cnt1);
		}
	}
	else{
		s.pb('1');
		recur(s);
		s.pop_back();
		s.pb('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].pb(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;
    }
    for (int i = 0 ; i < n ; i++){
    	for (int j = 0 ; j < m ; j++){
    		if (x[i][j] == '1')
				k[j]--;
			else
				k[j]++;
			//cout << k[j] << ' ';
    	}
    	ans = 0;
    	cur = x[i];
		str s1 = "";
    	recur(s1);
    	cout << ans << "\n";
    	for (int j = 0 ; j < m ; j++){
    		if (x[i][j] == '1')
				k[j]++;
			else
				k[j]--;
    	}
    }
}
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠤⢲⣦⡀⠀⣠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣠⠖⠚⠓⠒⠒⠲⠿⣍⣛⣻⣦⣷⢠⣻⣀⠤⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠔⡿⠓⠲⠬⢥⡤⠤⠤⠤⠤⣤⣀⣀⣈⣻⣿⣿⠓⠉⣀⡤⠔⢶⣻⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⢤⠞⠁⣼⠀⠀⠀⠀⠀⠀⠰⠶⢌⣽⡶⠟⢏⡁⢈⣉⣭⣷⡯⣝⠒⢦⣄⠙⠷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡾⣵⠿⣳⡟⠉⠉⠿⠀⠀⡀⠀⠀⣀⣀⣢⣾⣿⡚⠓⠒⠒⠒⠻⢿⣟⣧⡀⢠⣢⡻⠙⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⢿⣟⣲⢿⣷⢀⣤⣠⣄⣈⢿⣷⣤⣷⣻⡓⠒⠻⠭⢷⡄⠒⠲⢶⣦⣬⣻⣏⢦⡈⢿⣆⠘⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⢖⣩⠷⢎⣙⣿⣿⣼⡼⣿⣟⣽⣻⢯⢿⠞⣌⠙⢳⡕⠀⠙⠲⣶⠤⢄⡠⣄⡈⠛⣿⣿⣧⢳⣌⢻⡆⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠗⠉⢀⣾⠟⠒⡿⣫⡿⡾⢫⢟⡏⠉⢸⡀⠑⢾⡆⢤⣻⣶⣤⣘⣲⣿⣶⡽⠿⣯⠲⣌⣇⢹⣷⣿⣆⠸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⡼⠀⣿⢣⣧⠋⣸⠀⣰⢀⣿⣆⠀⠰⣄⠙⣧⣨⣿⣿⣿⣯⣿⣦⠘⣷⡌⢻⡄⠿⣆⠟⣆⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⡇⡼⣹⠈⢣⠆⡇⣰⣻⣼⣿⣽⣷⣦⣹⣿⣟⣯⠉⠘⣿⠏⠃⠀⣷⣽⡿⣾⡹⣷⣹⣧⡈⢺⡀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⢾⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⣷⣱⣽⡀⢸⣆⢳⣿⣇⣷⡿⠖⠿⠷⢦⣙⣆⠩⡗⠀⠀⠀⠀⠀⡯⠿⠳⣟⠻⣽⣄⢧⠈⠳⣷⡀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡇⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣿⣿⣷⣸⣿⡀⣿⣅⠛⠇⠀⠀⠀⠀⢈⠙⠂⠀⠀⠀⠀⠀⣸⣿⠀⢠⣜⢦⠘⢿⣮⣷⡀⠀⠙⢦⡀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⢯⣇⠙⢄⣀⠀⠀⠀⢀⣀⡠⣴⣾⣫⠵⠛⣿⣻⠿⣷⣹⣾⣷⡠⡀⠀⠀⠀⠻⠦⠀⣀⠔⠀⠀⣴⣿⣸⣧⡀⠳⣝⠳⢴⡙⢞⣏⠢⡀⠀⠹⡄⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⢀⣀⣀⣈⣻⣤⣀⠈⠉⠻⠿⢿⣺⣿⡵⣶⢶⣦⠀⠘⣿⢷⣾⢿⣿⡋⢙⣮⣄⡀⠀⠀⠉⠈⠀⠀⢀⢞⣿⣼⣿⣿⣿⣆⡀⠙⢦⣝⣮⠛⢷⡙⢆⠀⣷⠀⠀⠀⠀
///⠀⠀⠀⢠⡴⢟⣫⠤⠖⠒⠛⢛⣲⣿⣿⣿⠟⠋⢱⣿⣴⣷⣿⣹⢃⣀⣘⠃⢩⢿⣫⣥⣿⠧⢿⣿⣗⡶⣤⣄⣀⣴⣷⣻⣿⣿⠻⠘⣏⠛⢿⣦⣀⠱⢤⣉⡑⠛⠮⢿⣹⠀⠀⠀⠀
///⠀⢠⢖⠵⠊⠁⢀⡤⠖⣲⣿⣿⣟⣻⣿⣋⠀⠀⠈⢿⣿⡿⠟⣵⣿⣿⣿⣷⡏⠈⢿⡿⣷⣤⣼⢿⣿⣿⢶⣯⣭⣵⣾⢿⣿⠿⢦⡀⢹⠀⠈⣏⠉⠉⢻⣶⣯⡑⠦⣄⠈⠳⣄⠀
///⠀⠹⠁⠀⠀⣞⢁⡾⢽⣯⣝⣛⣛⣯⣭⣽⣿⣷⣶⣤⣤⣴⣿⣿⣿⣿⣿⣿⡀⣀⣼⣀⠈⠙⠛⠷⣾⡿⢿⡟⣿⠟⠁⣈⣥⡴⠾⠷⢾⡄⠀⣿⠀⠀⠈⢇⠘⣿⣤⣀⠑⢦⡘⢧⠀
///⠄⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⡿⠛⣻⢏⡽⣯⡄⠘⣏⣿⡏⠈⠙⠓⠶⣤⣀⠀⠙⢿⣿⡇⢀⡿⠋⠁⠀⢀⣀⣸⡇⠀⣟⣀⠀⠀⠀⠙⠃⣿⡎⠑⣤⡙⣌⡇
///⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⡥⣖⡯⠖⢋⣡⡞⣼⣿⠀⠀⢹⣿⣷⠀⠀⣀⡀⠀⠉⠻⣦⠀⢿⣿⡿⠁⣠⡶⠟⠋⠉⠹⣆⣸⣿⣿⠀⣀⡤⣤⡀⣿⠇⠀⢸⠳⡜⡇
///⠀⠀⠀⠀⠀⠀⠀⠀⣈⣿⣿⣿⣿⣿⣿⣏⢿⣗⠒⠊⠉⢸⠁⡿⡏⠀⢀⣿⡿⣁⠤⢶⣿⣽⡆⠀⠀⠘⢷⡈⠉⣡⠾⠋⠀⠀⣠⣆⢠⣿⣿⣿⡟⢀⣷⠒⢺⣧⡏⠀⠀⢸⠀⢹⣹
///⠀⠀⠀⠀⠀⠀⡠⢪⠟⡽⠙⢶⣾⣿⣿⣿⣷⡻⣦⡀⠀⠀⢣⣇⡇⢀⡞⣸⠏⠁⠀⠀⡇⢻⡀⠀⠀⣾⣶⡟⣿⣥⡄⠀⠀⢠⣇⣼⡶⣿⣿⠋⣸⣾⣷⣚⣽⡟⠀⠀⠀⣏⠀⡼⣿
///⠀⠀⠀⠀⢀⠎⡴⣣⣾⠟⣡⠞⢹⡿⣿⢿⣿⣿⣿⣷⣄⠀⠈⠻⡹⣼⠀⣿⡄⠀⠀⠀⠉⠻⣷⡀⠀⠙⠿⠇⣿⠿⠇⠀⠀⢠⡿⠋⢇⢹⣟⢷⠫⣿⣟⡿⠋⠀⠀⣠⣾⢞⡜⠁⡿
///⠀⠀⠀⠀⡼⡼⣵⠏⡏⣰⠃⠀⢾⡇⠈⠻⣿⣮⡉⠹⣿⣧⣄⡀⠙⣇⠀⠸⣿⣄⡀⠀⠀⠀⠈⢉⣧⡴⠀⠠⡄⣀⡤⠤⠴⠋⠁⠀⠈⢻⣿⣾⣤⡿⠋⠀⠀⠀⣉⣽⠿⠋⠀⣰⠃
///⠀⠀⠀⠀⣿⣽⠋⠀⡇⡇⠀⠀⠘⣷⢠⣶⢮⣻⣿⣦⠈⠛⠙⠹⣷⠘⢦⣤⣿⣳⣭⣑⣒⣒⣺⣿⢿⣀⣀⣀⣿⣧⣀⣀⣀⡤⠴⠒⣶⣿⣏⣾⡿⠁⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⢻⡏⠀⠀⢳⣇⠀⠀⠀⠈⠈⣿⣾⣿⣿⣮⣿⣦⠀⠀⢿⣶⡫⣿⣿⣿⣿⣿⡹⣯⣊⠁⠉⠉⠉⠉⢙⣮⣷⣶⡤⣤⣶⣿⣿⣟⣾⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠸⣿⣦⡀⠀⠙⠦⠀⠀⢀⣼⠿⣽⣿⣯⣷⣼⡷⢾⣻⣾⣿⠞⢿⢻⡷⠻⣿⣏⡙⢝⣻⡾⡖⠒⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⣎⠣⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⣴⣋⣉⣩⣿⣿⢿⣟⣷⣾⣯⡟⢱⡇⠀⠘⣿⠣⡀⣈⣻⣿⣿⣿⣷⣷⣶⣿⣿⣟⠋⡿⣹⣿⣿⣿⣿⢟⣏⠺⠿⠶⠭⠷⠂⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⢹⣮⣾⣿⡿⢋⣶⢸⡇⠀⠀⠈⢷⡑⠈⢻⣟⠛⠛⠿⠋⠙⠓⣭⣿⣹⣵⣿⣿⣿⣿⣿⠈⠻⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢟⣛⡭⠶⢾⡿⠃⠀⠀⢸⢹⣾⣇⠀⠀⠀⠀⠻⣟⣿⡏⠀⠀⠀⠀⢰⣿⣿⢿⡇⣿⣿⣿⣿⣟⡏⠀⠀⠀⠉⠙⠓⠒⠂⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡟⠀⠀⠀⢰⣿⢸⣿⢿⡀⠀⠀⠀⠀⢸⣿⣣⠀⠀⠀⢠⣿⡟⣷⣾⣿⢿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⠁⠀⠀⠀⠘⡿⡿⢿⣏⣧⠀⠀⠀⢀⣾⣿⠿⠀⢀⣴⣿⣿⢿⡹⡇⣿⠈⣿⣿⡟⣾⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡇⠀⠀⠀⠀⢳⢧⠈⢿⣿⠀⠀⢀⣼⣿⠕⠁⣠⣾⡿⣻⠏⠀⢹⣹⣿⣆⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣷⠀⠀⠀⠀⠈⣏⢧⠀⢻⣧⠶⣋⠿⠋⣀⣾⣟⣿⠞⠁⠀⠀⠀⢯⣿⣿⣿⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣇⠀⠀⠀⠀⠸⡜⣆⠈⢷⣿⠀⢠⣾⣿⠟⢻⡏⠀⠀⠀⠀⠀⠘⣿⣿⠏⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡻⣿⣿⣦⡀⠀⠀⠀⢧⠘⣆⠈⢷⠒⠛⢻⡿⠄⠘⣧⠀⠀⠀⠀⠀⢰⣷⣹⠀⠙⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣷⣝⣿⣿⣷⣄⠀⠀⠈⢇⠸⡄⠈⣇⠀⠀⢻⣆⠀⠘⣇⠀⠀⣠⣾⣽⢹⡟⠀⢰⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣾⢻⠙⢿⣿⡇⠀⠀⠈⢧⢳⠀⢸⡀⠀⠀⢻⣆⠀⢻⡄⢠⣿⣯⣽⣓⣧⣤⠾⢹⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣼⡇⠀⠙⣿⠀⠀⠀⠈⢏⢧⠀⣇⠀⠀⠀⢻⣆⠀⢷⠘⣿⣮⡻⣿⠁⠀⢀⣯⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠘⡾⡄⢸⠀⠀⠀⠈⢻⣆⠈⢷⣷⣾⣟⣻⣶⣿⡿⠛⢿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀⢳⣇⠘⡆⠀⠀⠀⠀⠻⣶⢺⡏⢹⡟⠀⠉⠁⠀⠀⠀⢩⣍⠙⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣟⣿⣿⣿⣧⠀⢀⣤⣤⡸⣸⠀⡇⠀⠀⠀⠀⠀⠙⣿⣷⢡⣿⣶⣄⠀⠀⣄⠀⣦⣍⠙⢳⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡿⢿⡙⠿⠀⢸⡟⢲⣷⡿⡄⢿⠀⠀⠀⠀⠀⠀⠘⣏⢸⣇⣍⢻⣷⣀⢻⣦⣤⣌⡙⣦⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣯⢷⠀⠀⠸⡇⠀⢿⣧⡇⢸⠀⠀⠀⠀⠀⠀⠀⣼⢸⣿⣯⠀⣿⣿⣷⣝⣿⣻⣿⣼⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣎⣧⠀⠐⣇⠀⠘⣽⣿⡸⡆⠀⠀⠀⠀⠀⠀⠈⠋⠈⠻⣼⣿⢶⢿⣿⣯⡻⣿⣿⣾⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡼⡆⠀⣿⡀⠀⣿⢿⡇⢷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣾⢧⠈⠙⠿⣮⠟⠉⠙⢦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⢻⢠⣿⡇⠀⠹⣄⢳⣜⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡏⠪⠳⢤⣄⣀⠀⠀⠀⠈⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀
///⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣎⣿⡟⡇⠀⠀⠈⢻⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢳⡄⠀⠀⠀⠙⢧⡀⢀⡄⠈⡇⠀⠀⠀⠀⠀⠀⠀⠀

Compilation message

council.cpp: In function 'void recur(str)':
council.cpp:26:11: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   26 |  if (s.sz == m){
      |      ~~~~~^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 9712 KB Output is correct
2 Correct 4 ms 9684 KB Output is correct
3 Correct 4 ms 9684 KB Output is correct
4 Correct 4 ms 9720 KB Output is correct
5 Correct 5 ms 9720 KB Output is correct
6 Correct 7 ms 9728 KB Output is correct
7 Correct 6 ms 9608 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 20 ms 9760 KB Output is correct
10 Correct 6 ms 9684 KB Output is correct
11 Correct 5 ms 9716 KB Output is correct
12 Correct 18 ms 9764 KB Output is correct
13 Correct 5 ms 9728 KB Output is correct
14 Correct 4 ms 9716 KB Output is correct
15 Correct 5 ms 9640 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 6 ms 9684 KB Output is correct
18 Correct 6 ms 9684 KB Output is correct
19 Correct 6 ms 9716 KB Output is correct
20 Correct 4 ms 9612 KB Output is correct
21 Correct 6 ms 9684 KB Output is correct
22 Correct 4 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 7 ms 9728 KB Output is correct
27 Correct 4 ms 9684 KB Output is correct
28 Correct 4 ms 9604 KB Output is correct
29 Correct 4 ms 9684 KB Output is correct
30 Correct 5 ms 9684 KB Output is correct
31 Correct 14 ms 9684 KB Output is correct
32 Correct 8 ms 9812 KB Output is correct
33 Correct 6 ms 9684 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 7 ms 9636 KB Output is correct
36 Correct 5 ms 9720 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9684 KB Output is correct
39 Correct 5 ms 9724 KB Output is correct
40 Correct 12 ms 9684 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9608 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 6 ms 9684 KB Output is correct
47 Correct 4 ms 9720 KB Output is correct
48 Correct 4 ms 9684 KB Output is correct
49 Correct 5 ms 9672 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 9712 KB Output is correct
2 Correct 4 ms 9684 KB Output is correct
3 Correct 4 ms 9684 KB Output is correct
4 Correct 4 ms 9720 KB Output is correct
5 Correct 5 ms 9720 KB Output is correct
6 Correct 7 ms 9728 KB Output is correct
7 Correct 6 ms 9608 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 20 ms 9760 KB Output is correct
10 Correct 6 ms 9684 KB Output is correct
11 Correct 5 ms 9716 KB Output is correct
12 Correct 18 ms 9764 KB Output is correct
13 Correct 5 ms 9728 KB Output is correct
14 Correct 4 ms 9716 KB Output is correct
15 Correct 5 ms 9640 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 6 ms 9684 KB Output is correct
18 Correct 6 ms 9684 KB Output is correct
19 Correct 6 ms 9716 KB Output is correct
20 Correct 4 ms 9612 KB Output is correct
21 Correct 6 ms 9684 KB Output is correct
22 Correct 4 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 7 ms 9728 KB Output is correct
27 Correct 4 ms 9684 KB Output is correct
28 Correct 4 ms 9604 KB Output is correct
29 Correct 4 ms 9684 KB Output is correct
30 Correct 5 ms 9684 KB Output is correct
31 Correct 14 ms 9684 KB Output is correct
32 Correct 8 ms 9812 KB Output is correct
33 Correct 6 ms 9684 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 7 ms 9636 KB Output is correct
36 Correct 5 ms 9720 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9684 KB Output is correct
39 Correct 5 ms 9724 KB Output is correct
40 Correct 12 ms 9684 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9608 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 6 ms 9684 KB Output is correct
47 Correct 4 ms 9720 KB Output is correct
48 Correct 4 ms 9684 KB Output is correct
49 Correct 5 ms 9672 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 306 ms 9964 KB Output is correct
52 Correct 320 ms 9964 KB Output is correct
53 Correct 1294 ms 10284 KB Output is correct
54 Correct 1282 ms 10292 KB Output is correct
55 Correct 153 ms 9728 KB Output is correct
56 Correct 1090 ms 10272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9720 KB Output is correct
2 Correct 86 ms 10680 KB Output is correct
3 Correct 87 ms 10620 KB Output is correct
4 Correct 60 ms 10568 KB Output is correct
5 Correct 101 ms 10664 KB Output is correct
6 Correct 69 ms 10584 KB Output is correct
7 Correct 99 ms 10612 KB Output is correct
8 Correct 5 ms 9716 KB Output is correct
9 Correct 5 ms 9680 KB Output is correct
10 Correct 5 ms 9652 KB Output is correct
11 Correct 4 ms 9720 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9716 KB Output is correct
14 Correct 5 ms 9744 KB Output is correct
15 Correct 5 ms 9724 KB Output is correct
16 Correct 6 ms 9720 KB Output is correct
17 Correct 132 ms 9732 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9720 KB Output is correct
2 Correct 86 ms 10680 KB Output is correct
3 Correct 87 ms 10620 KB Output is correct
4 Correct 60 ms 10568 KB Output is correct
5 Correct 101 ms 10664 KB Output is correct
6 Correct 69 ms 10584 KB Output is correct
7 Correct 99 ms 10612 KB Output is correct
8 Correct 5 ms 9716 KB Output is correct
9 Correct 5 ms 9680 KB Output is correct
10 Correct 5 ms 9652 KB Output is correct
11 Correct 4 ms 9720 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9716 KB Output is correct
14 Correct 5 ms 9744 KB Output is correct
15 Correct 5 ms 9724 KB Output is correct
16 Correct 6 ms 9720 KB Output is correct
17 Correct 132 ms 9732 KB Output is correct
18 Correct 5 ms 9600 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4018 ms 10592 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9720 KB Output is correct
2 Correct 86 ms 10680 KB Output is correct
3 Correct 87 ms 10620 KB Output is correct
4 Correct 60 ms 10568 KB Output is correct
5 Correct 101 ms 10664 KB Output is correct
6 Correct 69 ms 10584 KB Output is correct
7 Correct 99 ms 10612 KB Output is correct
8 Correct 5 ms 9716 KB Output is correct
9 Correct 5 ms 9680 KB Output is correct
10 Correct 5 ms 9652 KB Output is correct
11 Correct 4 ms 9720 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9716 KB Output is correct
14 Correct 5 ms 9744 KB Output is correct
15 Correct 5 ms 9724 KB Output is correct
16 Correct 6 ms 9720 KB Output is correct
17 Correct 132 ms 9732 KB Output is correct
18 Correct 5 ms 9600 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4018 ms 10592 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9720 KB Output is correct
2 Correct 86 ms 10680 KB Output is correct
3 Correct 87 ms 10620 KB Output is correct
4 Correct 60 ms 10568 KB Output is correct
5 Correct 101 ms 10664 KB Output is correct
6 Correct 69 ms 10584 KB Output is correct
7 Correct 99 ms 10612 KB Output is correct
8 Correct 5 ms 9716 KB Output is correct
9 Correct 5 ms 9680 KB Output is correct
10 Correct 5 ms 9652 KB Output is correct
11 Correct 4 ms 9720 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9716 KB Output is correct
14 Correct 5 ms 9744 KB Output is correct
15 Correct 5 ms 9724 KB Output is correct
16 Correct 6 ms 9720 KB Output is correct
17 Correct 132 ms 9732 KB Output is correct
18 Correct 5 ms 9600 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4018 ms 10592 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 9712 KB Output is correct
2 Correct 4 ms 9684 KB Output is correct
3 Correct 4 ms 9684 KB Output is correct
4 Correct 4 ms 9720 KB Output is correct
5 Correct 5 ms 9720 KB Output is correct
6 Correct 7 ms 9728 KB Output is correct
7 Correct 6 ms 9608 KB Output is correct
8 Correct 5 ms 9684 KB Output is correct
9 Correct 20 ms 9760 KB Output is correct
10 Correct 6 ms 9684 KB Output is correct
11 Correct 5 ms 9716 KB Output is correct
12 Correct 18 ms 9764 KB Output is correct
13 Correct 5 ms 9728 KB Output is correct
14 Correct 4 ms 9716 KB Output is correct
15 Correct 5 ms 9640 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 6 ms 9684 KB Output is correct
18 Correct 6 ms 9684 KB Output is correct
19 Correct 6 ms 9716 KB Output is correct
20 Correct 4 ms 9612 KB Output is correct
21 Correct 6 ms 9684 KB Output is correct
22 Correct 4 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 7 ms 9728 KB Output is correct
27 Correct 4 ms 9684 KB Output is correct
28 Correct 4 ms 9604 KB Output is correct
29 Correct 4 ms 9684 KB Output is correct
30 Correct 5 ms 9684 KB Output is correct
31 Correct 14 ms 9684 KB Output is correct
32 Correct 8 ms 9812 KB Output is correct
33 Correct 6 ms 9684 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 7 ms 9636 KB Output is correct
36 Correct 5 ms 9720 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9684 KB Output is correct
39 Correct 5 ms 9724 KB Output is correct
40 Correct 12 ms 9684 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9608 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 6 ms 9684 KB Output is correct
47 Correct 4 ms 9720 KB Output is correct
48 Correct 4 ms 9684 KB Output is correct
49 Correct 5 ms 9672 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 306 ms 9964 KB Output is correct
52 Correct 320 ms 9964 KB Output is correct
53 Correct 1294 ms 10284 KB Output is correct
54 Correct 1282 ms 10292 KB Output is correct
55 Correct 153 ms 9728 KB Output is correct
56 Correct 1090 ms 10272 KB Output is correct
57 Correct 5 ms 9720 KB Output is correct
58 Correct 86 ms 10680 KB Output is correct
59 Correct 87 ms 10620 KB Output is correct
60 Correct 60 ms 10568 KB Output is correct
61 Correct 101 ms 10664 KB Output is correct
62 Correct 69 ms 10584 KB Output is correct
63 Correct 99 ms 10612 KB Output is correct
64 Correct 5 ms 9716 KB Output is correct
65 Correct 5 ms 9680 KB Output is correct
66 Correct 5 ms 9652 KB Output is correct
67 Correct 4 ms 9720 KB Output is correct
68 Correct 5 ms 9684 KB Output is correct
69 Correct 5 ms 9716 KB Output is correct
70 Correct 5 ms 9744 KB Output is correct
71 Correct 5 ms 9724 KB Output is correct
72 Correct 6 ms 9720 KB Output is correct
73 Correct 132 ms 9732 KB Output is correct
74 Correct 5 ms 9600 KB Output is correct
75 Correct 4 ms 9684 KB Output is correct
76 Execution timed out 4018 ms 10592 KB Time limit exceeded
77 Halted 0 ms 0 KB -