摘要:
思路:高斯消元 把所有已知点列出 可以得到n+1个方程 形如 $ (a_1 A)^2 +(b_1 B)^2 + ... +(n_1 N)^2 = dis $ $ (a_2 A)^2 +(b_2 B)^2 + ... +(n_2 N)^2 = dis $ $ (a_3 A)^2 +(b_3 B)^2 阅读全文
摘要:
高斯消元模板 要求输出解的情况(无穷解/无解) 1. 之前写的丑陋代码 ~~~ include include include include using namespace std; const double eps=1e 7; const int maxn=1000; int n;//n个变量 阅读全文
摘要:
$ c_x y_{i_1} + (i_1 x) y_{i_1} s include include using namespace std; typedef long long LL; int n,s; LL ans,now=0x3f3f3f3f3f3f3f3f; int main(){ scanf 阅读全文
摘要:
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 typedef unsigned long long ull; 7 const int N=100005,p=131;//p进制 hash 8 int T,n,ans,len1,len2; 9 ull f[N],key1[N],k... 阅读全文
摘要:
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 typedef long long LL; 7 typedef set::iterator setit; 8 const LL INF=0x3f3f3f3f3f3f3f3f; 9 int n; 10 LL ans; 11 set s; 12 ... 阅读全文
摘要:
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int flag=1; 7 typedef pair p; 8 typedef set::iterator setit; 9 set s; 10 int main(){ 11 while(flag){ 12 scanf... 阅读全文
摘要:
1 //思路:贪心+堆 2 //不太好写啊 (抄的题解...) 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 const int maxk=50005; 10 using namespace std; 11 int ans,k,n,c,cnt1,cnt2,... 阅读全文
摘要:
1 //思路:贪心+堆 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 const int maxn=1000005; 9 int n,k,ans,ans_l,ans_r;//ans--答案区间长度 ans_l--答案区间左端点 ans_r--答案区间右端点 10... 阅读全文
摘要:
1 //贪心+优先队列(二叉堆) 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int N=1000050; 8 #define val first 9 #define dis second 10 int T,n,l,s,ans,now; 11 typedef pair p;... 阅读全文
摘要:
1 #include 2 #include 3 #include 4 using namespace std; 5 const int size=1000020,p=131; 6 typedef unsigned long long ULL; 7 ULL f[size],key[size]; 8 int T; 9 char tmp1[size],tmp2[size]; 10 ... 阅读全文