随笔分类 - 实用板子
摘要:Keyboard Free #include <bits/stdc++.h> #define ll long long #define ld long double #define pii pair<int, int> #define rep(i,a,b) for(ll i=a;i<=b;i++)
阅读全文
摘要:叉乘,点乘,用结构体存cos^2 int n, ans = 1, X[N], Y[N]; struct node { double x,y; node(): node(0,0){} node(double x,double y):x(x),y(y){} bool operator < (const
阅读全文
摘要:多校赛第二场B题 #include <bits/stdc++.h> #define ll long long #define lll unsigned long long #define pii pair<int, int> #define rep(i,a,b) for(ll i=a;i<=b;i+
阅读全文
摘要:题目描述 有一个a*b的整数组成的矩阵,现请你从中找出一个n*n的正方形区域,使得该区域所有数中的最大值和最小值的差最小。 输入格式 第一行为3个整数,分别表示a,b,n的值 第二行至第a+1行每行为b个非负整数,表示矩阵中相应位置上的数。每行相邻两数之间用一空格分隔。 输出格式 仅一个整数,为a*
阅读全文
摘要:恢复内容开始 D. Grid-00100 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A mad scientist Dr.J
阅读全文
摘要:Ujan has been lazy lately, but now has decided to bring his yard to good shape. First, he decided to paint the path from his house to the gate. The pa
阅读全文
摘要:扩展欧几里得求逆元 void exgcd ( int a , int b ) { if ( b == 0 ) { x = 1; y = 0; return ; } exgcd ( b , a % b ); int xx , yy; xx = y; yy = x - (a/b) * y; x = xx
阅读全文
摘要:E 判断是否有死循环 #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <map> #include <sstre
阅读全文
摘要:You are given an array aa of length nn consisting of zeros. You perform nn actions with this array: during the ii-th action, the following sequence of
阅读全文
摘要:Writing light novels is the most important thing in Linova's life. Last night, Linova dreamed about a fantastic kingdom. She began to write a light no
阅读全文
摘要:Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself. Recently Xenia
阅读全文
摘要:Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but
阅读全文
摘要:Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Be
阅读全文
摘要:The 2018 World Cup was held recently in Russia. Some great soccer countries (e.g., Italy,Netherlands, Chile, USA) did not qualify for this World Cup.
阅读全文
摘要:Cuber QQ 在疫情期间已经宅在家两个月了。 实在是无所事事的他,决定重操旧业,继续实现他曾经梦寐的钢琴演奏家梦想。 掀开积满了灰尘的钢琴盖,是他许久都未触碰的琴键,按下的瞬间,他发现,钢琴坏了。 Cuber QQ 有一个多年的弹奏习惯,他弹奏钢琴,同一时刻一定会同时按下 m 个琴键,他喜欢不同
阅读全文
摘要:Constanze is the smartest girl in her village but she has bad eyesight. One day, she was able to invent an incredible machine! When you pronounce lett
阅读全文

浙公网安备 33010602011771号