Follow us


Competitive Programming
  -  Programming   -  Competitive Programming

Google Code Jam 2022 Qual solutions A. Punched Cards Given R and C, print the matrix with RxC Punched Card Python. Limits Time limit: 5 seconds.Memory limit: 1 GB. Test Set 1 (Visible Verdict) 1≤T≤811≤T≤81.2≤R≤102≤R≤10.2≤C≤102≤C≤10. Solution /** * author: ekusiadadus * created: 02.04.2022 15:34:43 **/ #include<bits/stdc++.h> using namespace std; using i64 = long long; int main(){ cin.tie(0); ios_base::sync_with_stdio(false); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int

Google Kickstart 2021 Round A Solutions K-Goodness String Problem Charles defines the goodness score of a string as the number of indices ii such that Si≠SN−i+1Si≠SN−i+1 where 1≤i≤N/21≤i≤N/2 (11-indexed). For example, the string CABABC has a goodness score of 22 since S2≠S5S2≠S5 and S3≠S4S3≠S4. Charles gave Ada a string SS of length NN, consisting of uppercase letters and asked her to convert it into a string with a goodness score of KK. In one operation, Ada can change any character in the string to