题目链接:https://atcoder.jp/contests/abc190/tasks/abc190_c 排列树,数据比较少,暴力搜索即可 参考代码 #include <bits/stdc++.h> using namespace std; #define int long long
AtCoder Beginner Contest 190 传送门:https://atcoder.jp/contests/abc190 A: Takahashi和Aoki分别有A和B颗糖果,两人轮流吃一个,若C为0则Takahashi先吃,C为1则Aoki先吃,先吃完的为输。 1#include <iostream>2#include <cstdio>3#include <vector>4#include <algorithm>5#include <queue>6#include <vecto...
/bin/sh# 第一引数 問題番号# cd abc/190aliasg++='g++-10'# 現在のパスを取得path=$(cd$(dirname$0);pwd)# コンテストレベルcontestLevel=${path##*atcoder/}contestLevel=${contestLevel%/*}# コンテスト番号contestNumber=${path#*c/}# 問題番号 引数questionNumber="$1"if[$#-eq2];thene...
abc190 C - Bowls and Dishes bit 全探索 past201912-open G - 組分け bit 全探索 arc107 B - Quadruple Misc abc016 C - 友達の友達 Floyd-Warshall abc143 E - Travel by Car Floyd-Warshall arc001 B - リモコン BFS abc123 D - Cake 123 Heap abc137 D - Summer Vacation Heap abc141 D ...
博客阅读:https://www.luogu.com.cn/blog/222865/abc190f-xie-ti-bao-gao 大水题.预处理最开始的逆序对个数,然后O(1)维护即可 #include<stdio.h> int n, a[5000010], b[5000010], c[300010]; long long ans; void msort(int l, int r) { ...
問題名は AtCoder の場合は abc190_a の形式、Yukicoder の場合は1692の形式で入力します。いずれも URL から確認してください。 解答する言語は.py,.ts, .js から選択します。 ソースコードは src/atcoder/abcXXX/abcXXX_X.ts に生成されます。 テストデータは src/atcoder/abcXXX/abcXXX...
AC代码:https://atcoder.jp/contests/abc300/submissions/41320321 题意: 如果一个正整数的所有质因子都不超过k,则称其为k平滑数。 给定一个整数N和一个不超过100的素数P, 求不超过N的P-平滑数的个数。 题解: 分治原则 #include "stdafx.h" #include <iostream> #include <cstdio> #include <algorithm...
Atcoder ABC 190 赛后解题报告 最后 40min 都没搞出来 E 我也是服了。 A - Very Very Primitive Game / 首先理解题意,不是谁先吃完谁赢,而是谁先吃完,谁输。 然后就简单了,注意在 \(a=b\) 是要考虑谁是先手,先手必输。 //Don't
按顺序读入,判断是否有满足条件的技能即可(ABC第二题比第一题简单是传统艺能吗) #include<iostream>#include<cstdio>#include<cstring>#defineN 200005usingnamespacestd;intread(){intx=0,f=1;charch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<=...
add ABC005 Feb 27, 2025 ABC010 add ABC336 Oct 16, 2024 ABC128 add ABC128 May 16, 2025 ABC129 add ABC129 May 15, 2025 ABC131~140 ABC138およびABC139のA.py、B.py、C.pyを新規追加し、ABC140のA.py、B.py、C.pyも新規追加