首页 > GCPC总决赛
头像 此在Dasein
发表于 2025-11-11 02:18:52
#include <algorithm> #include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); 展开全文
头像 lahm66
发表于 2025-11-11 10:51:58
语言:Java知识点:全排列根据案例,题意好懂,就是要对b进行全排列,然后和a进行比较。计算得分,然后比较是否成功。这个知识点主要是进行全排列(回溯)。这里参考力扣题解(https://leetcode.cn/problems/permutations/solutions/218275/quan-p 展开全文
头像 Puzzlemaster_Khadgar
发表于 2025-11-11 16:38:35
随机化秒了注意1 1和1 1这样也算是两种组合方式,所以要反去重 #include<bits/stdc++.h> #define int long long #define mp make_pair #define pb push_back #define PII pair<int 展开全文
头像 爆炸电台
发表于 2025-11-11 18:21:42
#include <bits/stdc++.h> using namespace std; int main() { int n, a = 0, b = 0, c = 0; cin >> n; vector<int> p(n), px(n) 展开全文
头像 WTcrazy
发表于 2025-11-14 02:56:25
import java.util.Scanner; public class Main { static int n, win, fail, draw; static int[] a = new int[100]; static int[] b = new int[100 展开全文
头像 appley
发表于 2025-11-11 11:52:45
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner in = 展开全文
头像 已被标记为菜弊__chais
发表于 2025-11-11 15:06:45
定义dp[s][k][p]为在s状态下 DarknessCatcher得k分,yxlxszx得q分的情况数。对于状态s:我们选择固定b数组,重新排列a数组来达到全部匹配的情况,其中s的二进制为1的位表示选择a[i]进行匹配。状态转移方程:当前选择a[j],若a[j]==b[i]:dp[s][p][k 展开全文
头像 哈机米_那没鲁多
发表于 2025-11-11 20:27:12
#include<iostream> using namespace std; const int N = 15; int n; int da[N], yx[N]; bool dy[N]; int cun = 0; int v = 0; int p = 0; int f = 0; voi 展开全文
头像 希望offer多来的海绵宝宝
发表于 2025-11-11 20:43:29
#include <iostream> #include <vector> #include <algorithm> using namespace std; using ll = long long; //暴力解法 int main() { int n; 展开全文
头像 希望offer多来的海绵宝宝
发表于 2025-11-11 20:46:46
#include <iostream> #include <vector> #include <cstring> using namespace std; using ll = long long; int main() { int n; cin 展开全文