Submission #795223

# Submission time Handle Problem Language Result Execution time Memory
795223 2023-07-27T07:38:20 Z vjudge1 Council (JOI23_council) C++17
22 / 100
4000 ms 10316 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){
		//cout << s << "\n"
		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+='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;
    }
    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){
      |      ~~~~~^~~~
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 4 ms 9684 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 7 ms 9684 KB Output is correct
7 Correct 4 ms 9684 KB Output is correct
8 Correct 4 ms 9636 KB Output is correct
9 Correct 21 ms 9748 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 4 ms 9684 KB Output is correct
12 Correct 19 ms 9764 KB Output is correct
13 Correct 4 ms 9684 KB Output is correct
14 Correct 4 ms 9672 KB Output is correct
15 Correct 5 ms 9684 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 4 ms 9684 KB Output is correct
20 Correct 4 ms 9684 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 4 ms 9684 KB Output is correct
23 Correct 4 ms 9684 KB Output is correct
24 Correct 4 ms 9684 KB Output is correct
25 Correct 5 ms 9684 KB Output is correct
26 Correct 6 ms 9684 KB Output is correct
27 Correct 4 ms 9684 KB Output is correct
28 Correct 5 ms 9684 KB Output is correct
29 Correct 4 ms 9708 KB Output is correct
30 Correct 4 ms 9684 KB Output is correct
31 Correct 12 ms 9684 KB Output is correct
32 Correct 4 ms 9684 KB Output is correct
33 Correct 4 ms 9684 KB Output is correct
34 Correct 4 ms 9684 KB Output is correct
35 Correct 6 ms 9684 KB Output is correct
36 Correct 4 ms 9640 KB Output is correct
37 Correct 4 ms 9684 KB Output is correct
38 Correct 4 ms 9684 KB Output is correct
39 Correct 4 ms 9684 KB Output is correct
40 Correct 12 ms 9740 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 4 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9708 KB Output is correct
45 Correct 4 ms 9684 KB Output is correct
46 Correct 4 ms 9684 KB Output is correct
47 Correct 4 ms 9684 KB Output is correct
48 Correct 4 ms 9720 KB Output is correct
49 Correct 4 ms 9684 KB Output is correct
50 Correct 4 ms 9684 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 4 ms 9684 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 7 ms 9684 KB Output is correct
7 Correct 4 ms 9684 KB Output is correct
8 Correct 4 ms 9636 KB Output is correct
9 Correct 21 ms 9748 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 4 ms 9684 KB Output is correct
12 Correct 19 ms 9764 KB Output is correct
13 Correct 4 ms 9684 KB Output is correct
14 Correct 4 ms 9672 KB Output is correct
15 Correct 5 ms 9684 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 4 ms 9684 KB Output is correct
20 Correct 4 ms 9684 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 4 ms 9684 KB Output is correct
23 Correct 4 ms 9684 KB Output is correct
24 Correct 4 ms 9684 KB Output is correct
25 Correct 5 ms 9684 KB Output is correct
26 Correct 6 ms 9684 KB Output is correct
27 Correct 4 ms 9684 KB Output is correct
28 Correct 5 ms 9684 KB Output is correct
29 Correct 4 ms 9708 KB Output is correct
30 Correct 4 ms 9684 KB Output is correct
31 Correct 12 ms 9684 KB Output is correct
32 Correct 4 ms 9684 KB Output is correct
33 Correct 4 ms 9684 KB Output is correct
34 Correct 4 ms 9684 KB Output is correct
35 Correct 6 ms 9684 KB Output is correct
36 Correct 4 ms 9640 KB Output is correct
37 Correct 4 ms 9684 KB Output is correct
38 Correct 4 ms 9684 KB Output is correct
39 Correct 4 ms 9684 KB Output is correct
40 Correct 12 ms 9740 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 4 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9708 KB Output is correct
45 Correct 4 ms 9684 KB Output is correct
46 Correct 4 ms 9684 KB Output is correct
47 Correct 4 ms 9684 KB Output is correct
48 Correct 4 ms 9720 KB Output is correct
49 Correct 4 ms 9684 KB Output is correct
50 Correct 4 ms 9684 KB Output is correct
51 Correct 299 ms 9856 KB Output is correct
52 Correct 306 ms 9840 KB Output is correct
53 Correct 1297 ms 10168 KB Output is correct
54 Correct 1280 ms 10176 KB Output is correct
55 Correct 139 ms 9700 KB Output is correct
56 Correct 1065 ms 10164 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 86 ms 10256 KB Output is correct
3 Correct 91 ms 10212 KB Output is correct
4 Correct 52 ms 10316 KB Output is correct
5 Correct 103 ms 10264 KB Output is correct
6 Correct 57 ms 10268 KB Output is correct
7 Correct 98 ms 10232 KB Output is correct
8 Correct 5 ms 9736 KB Output is correct
9 Correct 4 ms 9684 KB Output is correct
10 Correct 6 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 4 ms 9672 KB Output is correct
14 Correct 5 ms 9716 KB Output is correct
15 Correct 4 ms 9592 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 129 ms 9704 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 86 ms 10256 KB Output is correct
3 Correct 91 ms 10212 KB Output is correct
4 Correct 52 ms 10316 KB Output is correct
5 Correct 103 ms 10264 KB Output is correct
6 Correct 57 ms 10268 KB Output is correct
7 Correct 98 ms 10232 KB Output is correct
8 Correct 5 ms 9736 KB Output is correct
9 Correct 4 ms 9684 KB Output is correct
10 Correct 6 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 4 ms 9672 KB Output is correct
14 Correct 5 ms 9716 KB Output is correct
15 Correct 4 ms 9592 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 129 ms 9704 KB Output is correct
18 Correct 4 ms 9684 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4065 ms 9828 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 86 ms 10256 KB Output is correct
3 Correct 91 ms 10212 KB Output is correct
4 Correct 52 ms 10316 KB Output is correct
5 Correct 103 ms 10264 KB Output is correct
6 Correct 57 ms 10268 KB Output is correct
7 Correct 98 ms 10232 KB Output is correct
8 Correct 5 ms 9736 KB Output is correct
9 Correct 4 ms 9684 KB Output is correct
10 Correct 6 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 4 ms 9672 KB Output is correct
14 Correct 5 ms 9716 KB Output is correct
15 Correct 4 ms 9592 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 129 ms 9704 KB Output is correct
18 Correct 4 ms 9684 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4065 ms 9828 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 86 ms 10256 KB Output is correct
3 Correct 91 ms 10212 KB Output is correct
4 Correct 52 ms 10316 KB Output is correct
5 Correct 103 ms 10264 KB Output is correct
6 Correct 57 ms 10268 KB Output is correct
7 Correct 98 ms 10232 KB Output is correct
8 Correct 5 ms 9736 KB Output is correct
9 Correct 4 ms 9684 KB Output is correct
10 Correct 6 ms 9684 KB Output is correct
11 Correct 5 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 4 ms 9672 KB Output is correct
14 Correct 5 ms 9716 KB Output is correct
15 Correct 4 ms 9592 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 129 ms 9704 KB Output is correct
18 Correct 4 ms 9684 KB Output is correct
19 Correct 4 ms 9684 KB Output is correct
20 Execution timed out 4065 ms 9828 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 4 ms 9684 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 7 ms 9684 KB Output is correct
7 Correct 4 ms 9684 KB Output is correct
8 Correct 4 ms 9636 KB Output is correct
9 Correct 21 ms 9748 KB Output is correct
10 Correct 5 ms 9684 KB Output is correct
11 Correct 4 ms 9684 KB Output is correct
12 Correct 19 ms 9764 KB Output is correct
13 Correct 4 ms 9684 KB Output is correct
14 Correct 4 ms 9672 KB Output is correct
15 Correct 5 ms 9684 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 4 ms 9684 KB Output is correct
20 Correct 4 ms 9684 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 4 ms 9684 KB Output is correct
23 Correct 4 ms 9684 KB Output is correct
24 Correct 4 ms 9684 KB Output is correct
25 Correct 5 ms 9684 KB Output is correct
26 Correct 6 ms 9684 KB Output is correct
27 Correct 4 ms 9684 KB Output is correct
28 Correct 5 ms 9684 KB Output is correct
29 Correct 4 ms 9708 KB Output is correct
30 Correct 4 ms 9684 KB Output is correct
31 Correct 12 ms 9684 KB Output is correct
32 Correct 4 ms 9684 KB Output is correct
33 Correct 4 ms 9684 KB Output is correct
34 Correct 4 ms 9684 KB Output is correct
35 Correct 6 ms 9684 KB Output is correct
36 Correct 4 ms 9640 KB Output is correct
37 Correct 4 ms 9684 KB Output is correct
38 Correct 4 ms 9684 KB Output is correct
39 Correct 4 ms 9684 KB Output is correct
40 Correct 12 ms 9740 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 4 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9708 KB Output is correct
45 Correct 4 ms 9684 KB Output is correct
46 Correct 4 ms 9684 KB Output is correct
47 Correct 4 ms 9684 KB Output is correct
48 Correct 4 ms 9720 KB Output is correct
49 Correct 4 ms 9684 KB Output is correct
50 Correct 4 ms 9684 KB Output is correct
51 Correct 299 ms 9856 KB Output is correct
52 Correct 306 ms 9840 KB Output is correct
53 Correct 1297 ms 10168 KB Output is correct
54 Correct 1280 ms 10176 KB Output is correct
55 Correct 139 ms 9700 KB Output is correct
56 Correct 1065 ms 10164 KB Output is correct
57 Correct 4 ms 9684 KB Output is correct
58 Correct 86 ms 10256 KB Output is correct
59 Correct 91 ms 10212 KB Output is correct
60 Correct 52 ms 10316 KB Output is correct
61 Correct 103 ms 10264 KB Output is correct
62 Correct 57 ms 10268 KB Output is correct
63 Correct 98 ms 10232 KB Output is correct
64 Correct 5 ms 9736 KB Output is correct
65 Correct 4 ms 9684 KB Output is correct
66 Correct 6 ms 9684 KB Output is correct
67 Correct 5 ms 9684 KB Output is correct
68 Correct 5 ms 9684 KB Output is correct
69 Correct 4 ms 9672 KB Output is correct
70 Correct 5 ms 9716 KB Output is correct
71 Correct 4 ms 9592 KB Output is correct
72 Correct 5 ms 9684 KB Output is correct
73 Correct 129 ms 9704 KB Output is correct
74 Correct 4 ms 9684 KB Output is correct
75 Correct 4 ms 9684 KB Output is correct
76 Execution timed out 4065 ms 9828 KB Time limit exceeded
77 Halted 0 ms 0 KB -