摘要:
My birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F 阅读全文
摘要:
#include <iostream> using namespace std; const int N = 100010; int p[N];//要去的城市 int A[N], B[N], C[N]; long long s, ans[N];//ans差分数组 int main() { int N 阅读全文
摘要:
问题分析:这个比y总的二维差分模板要简单一些,因为他一开始的矩阵都为0,而且矩阵是一个n方阵,那么其实可以用y总的模板来写, 下面是二维差分矩阵的原理 #include <iostream> using namespace std; const int N = 1010; int b[N][N]; 阅读全文
摘要:
#include <iostream> using namespace std; const int N = 110; int a[N][N]; int main() { int t; scanf("%d", &t); int s, c; while(t -- )//t次测试用例 { scanf(" 阅读全文
摘要:
题面:Problem J. Master of GCDHakase has n numbers in a line. At first, they are all equal to 1. Besides, Hakase is interested in primes.She will choose 阅读全文
摘要:
题目描述:FJ's N (1 ≤ N ≤ 10,000) cows conveniently indexed 1..N are standing in a line. Each cow has a positive integer height (which is a bit of secret). 阅读全文
摘要:
#include<bits/stdc++.h>const int N = 1e6 + 10;int Cnt[N], S[N];//Cnt用于记录前缀和出现的次数 S用于计算前缀和 using namespace std; int main(){ int n, x = 0; long long ans 阅读全文
摘要:
阅读全文
摘要:
阅读全文