Atcoder Beginner Contest 184 A-Determinant Solution: 输出$ad-bc$ #include <iostream> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> ...
分类:
其他好文 时间:
2020-11-26 15:23:49
阅读次数:
14
1. P2065 [TJOI2011]卡片 桌子上现在有m张蓝色卡片和n张红色卡片,每张卡片上有一个大于1的整数。现在你要从桌子上拿走一些卡片,分若干次拿。每次只能拿走一组卡片:这组卡片颜色不同,并且两张卡片上面的数字的最大公约数大于1。问:最多可以从桌上拿走多少张卡片。 直接建图应该是可以的,但是 ...
分类:
其他好文 时间:
2020-11-26 14:51:15
阅读次数:
4
problem: 给你n个数字,和m个查询. 将[l,r]之间数第一次出现的位置信息弄成一个新的数组,然后找出其中k/2大的数.(k为位置的数量) #include<bits/stdc++.h> using namespace std; const int maxn=2e5+100; const i ...
分类:
其他好文 时间:
2020-11-26 14:12:20
阅读次数:
3
7-1 阅览室,感觉思路还好,但是写的太繁琐了,借鉴一下过的代码,又写了一遍;,代码: #include<bits/stdc++.h> using namespace std; int s[1010],w[1010]; int main() { int n; cin>>n; while(n--) { ...
分类:
其他好文 时间:
2020-11-26 14:11:33
阅读次数:
3
基础知识 VueX作用 VueX是一个数据仓库,它可以管理多个组件公用的数据。 没有学习VueX的时候,子组件要向父级组件传递信息则通过$emit()自定义事件,父组件如果要向子组件传递信息则通过props。 这是一种单向的数据流,操纵起来比较麻烦。 有了VueX一切都变得简单了,你只需要从VueX ...
分类:
其他好文 时间:
2020-11-25 12:51:21
阅读次数:
5
珠心算p2141灵感: #include<bits/stdc++.h> using namespace std; int s[101]; int x=0; int main(){ int t=0; int n; cin>>n; for(int i=0;i<n;i++){ cin>>s[i]; } f ...
分类:
其他好文 时间:
2020-11-25 12:25:50
阅读次数:
4
C++ 内联函数 #include <iostream> using namespace std; inline int Max(int a, int b) { if (a > b) return a; else return b; } int main() { cout << Max(23, 5) ...
分类:
其他好文 时间:
2020-11-25 12:08:44
阅读次数:
2
main.h文件 #ifndef MAIN_HPP #define MAIN_HPP #include <iostream>//使用C++库 #include <string> #include <stdio.h>//printf和FILE要用的 using namespace std; /* * ...
分类:
其他好文 时间:
2020-11-24 13:01:44
阅读次数:
22
using NLog; using System; using System.IO.Ports; using System.Text; using System.Threading; namespace TestCom485 { class Program { static void Main(st ...
分类:
其他好文 时间:
2020-11-24 12:42:10
阅读次数:
9
__int128 是比 long long 还要大的数据类型(\(max = 2^{128}-1\)) 其输入和输出不能用常规方法,用 read() 和 write() 函数代替 #include<bits/stdc++.h> using namespace std; __int128 read(i ...
分类:
其他好文 时间:
2020-11-24 12:37:39
阅读次数:
6