首页 > 翻之
头像 lhp_zml
发表于 2025-03-09 20:00:51
// 遍历每一列,每一列的字符组成一个字符串,相同的字符串可以在变换的情况下是的全为 1 // 不同的字符串不可能通过变换使得全为 1 ( 能发现这一点就好了 ) #include<bits/stdc++.h> using namespace std; const int N=3e3+ 展开全文
头像 CARLJOSEPHLEE
发表于 2025-03-04 15:34:37
import sys from collections import Counter n, m = map(int, sys.stdin.readline().split()) matrix = [sys.stdin.readline().strip() for _ in range(n)] co 展开全文
头像 陈zx
发表于 2025-03-05 04:09:35
n, m = map(int,input().split()) tatal_max = 1 arr=[] for i in range(0,n): arr.append(str(input())) columns = {} for j in range(m): col = ''.j 展开全文
头像 番禺小韭菜
发表于 2025-03-05 17:49:48
#include <iostream> #include <vector> #include <unordered_map> #include <string> #include <algorithm> using namespace s 展开全文
头像 Goldminer
发表于 2025-04-24 15:49:07
#include <iostream> #include <string> #include <vector> #include <unordered_map> using namespace std; int main() { // 读取 展开全文
头像 何成95
发表于 2025-06-06 20:23:56
关键在于对题目进行逻辑分析,根据分析可知:1、当两列元素或元素构成的字符串相同时,才能通过行元素反转颠倒变换,使得两列元素相同。2、题目寻找的最大相同列或最大相同列元素字符串数量。 n, m = map(int, input().split()) matrix = [input() for _ in 展开全文
头像 super_newcoder
发表于 2025-06-01 17:52:06
while True: try: n, m = map(int, input().split()) a = [] for _ in range(n): a.append(input().strip()) 展开全文
头像 ~枯藤~
发表于 2025-03-27 13:06:14
import java.util.*; import java.io.*; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) throws Exc 展开全文
头像 鳗鱼山
发表于 2025-04-21 16:13:26
import java.util.HashMap; import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] ar 展开全文

等你来战

查看全部