Submission #978553

#TimeUsernameProblemLanguageResultExecution timeMemory
978553vjudge1Council (JOI23_council)C++17
16 / 100
4067 ms26264 KiB
#include <time.h> #include <cstdlib> #include <stack> #include <numeric> #include <unordered_map> #include <unordered_set> #include <iomanip> #include <map> #include <set> #include <iterator> #include <deque> #include <queue> #include <sstream> #include <array> #include <string> #include <tuple> #include <chrono> #include <cassert> #include <cstdio> #include <cstring> #include <list> #include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <bitset> using namespace std; int tt = 1, n, m; int A[300001][21], cnt[22]; int main(){ ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> n >> m; for(int i = 1; i <= n; i++){ for(int j = 1; j <= m; j++){ cin >> A[i][j]; cnt[j] += A[i][j]; } } for(int i = 1; i <= n; i++){ int mx = 0; for(int j = 1; j <= n; j++){ if(i == j) continue; int kol = 0; for(int ind = 1; ind <= m; ind++){ if(cnt[ind] - A[i][ind] - A[j][ind] >= n / 2) kol++; } mx = max(mx, kol); } cout << mx << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...