diff --git a/2022暑假训练题09:回眸一笑.url b/2022暑假训练题09:回眸一笑.url new file mode 100644 index 0000000..de54557 --- /dev/null +++ b/2022暑假训练题09:回眸一笑.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +URL=https://vjudge.net/contest/509214 +IDList= diff --git a/8.13/B-Suspicious/B.pdf b/8.13/B-Suspicious/B.pdf new file mode 100644 index 0000000..be8e1fa --- /dev/null +++ b/8.13/B-Suspicious/B.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:967118ec454bfe7ab789c33ae929ae37d1bd46ce94de99137e4b91e519319a86 +size 163787 diff --git a/8.13/E-VasyaTriangle/E-VasyaTriangle.cpp b/8.13/E-VasyaTriangle/E-VasyaTriangle.cpp index 96068ba..bcfc05b 100644 --- a/8.13/E-VasyaTriangle/E-VasyaTriangle.cpp +++ b/8.13/E-VasyaTriangle/E-VasyaTriangle.cpp @@ -3,12 +3,14 @@ #include #include using namespace std; -int n, m, k; -int gcd(int a, int b) +// #define int long long +// #define %d %ld +long long n, m, k; +long long gcd(long long a, long long b) { while (b != 0) { - int tmp = a; + long long tmp = a; a = b; b = tmp % b; } @@ -18,28 +20,28 @@ int main() { // freopen("bout.txt","w",stdout); - scanf("%d%d%d", &n, &m, &k); - printf("%d %d %d \n",n,m,k); - int s = n * m / k * 2; - if (n * m * 2 % k != 0) + scanf("%ld%ld%ld", &n, &m, &k); + // printf("%ld %ld %ld \n",n,m,k); + long long s = n * m / k * 2; + if ((n * m * 2 )% k != 0)//int Ĵ { - printf("%d %d %d %d \n",n,m,k,n * m * 2 % k); - printf("\\NO"); + // printf("%ld %ld %ld %ld \n",n,m,k,n * m * 2 % k); + printf("NO"); return 0; } - int n1 = gcd(k, n), m1 = gcd(k / n1, m); - int n2 = n / n1, m2 = m / m1; + long long n1 = gcd(k, n), m1 = gcd(k / n1, m); + long long n2 = n / n1, m2 = m / m1; if (n2 * m2 / 2 * 2 == s) //*2Ϊʼʱs*=2; { - printf("YES\n0 0\n%d 0\n0 %d", n2, m2); + printf("YES\n0 0\n%ld 0\n0 %ld", n2, m2); } else if (n2 * 2 <= n) { - printf("YES\n0 0\n%d 0\n0 %d", n2 * 2, m2); + printf("YES\n0 0\n%ld 0\n0 %ld", n2 * 2, m2); } else { - printf("YES\n0 0\n%d 0\n0 %d", n2, m2 * 2); + printf("YES\n0 0\n%ld 0\n0 %ld", n2, m2 * 2); } return 0; } diff --git a/8.13/E-VasyaTriangle/test/in2.txt b/8.13/E-VasyaTriangle/test/in2.txt index e69de29..3ea7033 100644 --- a/8.13/E-VasyaTriangle/test/in2.txt +++ b/8.13/E-VasyaTriangle/test/in2.txt @@ -0,0 +1,2 @@ + +16904235 79092881 127345237 \ No newline at end of file diff --git a/8.15/2022暑假训练题08:差分约束.url b/8.15/2022暑假训练题08:差分约束.url new file mode 100644 index 0000000..aaddeed --- /dev/null +++ b/8.15/2022暑假训练题08:差分约束.url @@ -0,0 +1,4 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +URL=https://vjudge.net/contest/509525 diff --git a/8.15/A-Intervals/A.pdf b/8.15/A-Intervals/A.pdf new file mode 100644 index 0000000..ea27e16 --- /dev/null +++ b/8.15/A-Intervals/A.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9cc3425c04f2bbfff4f88edb7a9dcc9cbf9248de50f1307499ebc6186e3cb0c8 +size 72766 diff --git a/8.15/A-Intervals/Readme.md b/8.15/A-Intervals/Readme.md new file mode 100644 index 0000000..1d70f58 --- /dev/null +++ b/8.15/A-Intervals/Readme.md @@ -0,0 +1,14 @@ +# Problem A. Intervals +* https://vjudge.net/contest/509525#problem/A +### +ϸn估Ҫǵĵÿһ㣩ҪǶٸ +### +Լ +### ؼ +Լ·spfa +### ״ +//nǵmaxn +//©һ +in[u]=0;//spfaľ裡 +### +* Լ·PPT \ No newline at end of file diff --git a/8.15/A-Intervals/Template/Readme.md b/8.15/A-Intervals/Template/Readme.md new file mode 100644 index 0000000..de262f7 --- /dev/null +++ b/8.15/A-Intervals/Template/Readme.md @@ -0,0 +1,12 @@ +# Ŀ +* +### + +### + +### ؼ + +### ״ + +### +* \ No newline at end of file diff --git a/8.15/A-Intervals/Template/doc/Readme.md b/8.15/A-Intervals/Template/doc/Readme.md new file mode 100644 index 0000000..4e768b5 --- /dev/null +++ b/8.15/A-Intervals/Template/doc/Readme.md @@ -0,0 +1 @@ +# \ No newline at end of file diff --git a/8.15/A-Intervals/Template/main.cpp b/8.15/A-Intervals/Template/main.cpp new file mode 100644 index 0000000..b6d31b7 --- /dev/null +++ b/8.15/A-Intervals/Template/main.cpp @@ -0,0 +1,6 @@ +#include +using namespace std; +int main() +{ + +} diff --git a/8.15/A-Intervals/Template/test/in.txt b/8.15/A-Intervals/Template/test/in.txt new file mode 100644 index 0000000..e69de29 diff --git a/8.15/A-Intervals/Template/test/in2.txt b/8.15/A-Intervals/Template/test/in2.txt new file mode 100644 index 0000000..e69de29 diff --git a/8.15/A-Intervals/Template/test/in3.txt b/8.15/A-Intervals/Template/test/in3.txt new file mode 100644 index 0000000..e69de29 diff --git a/8.15/A-Intervals/Template/test/out.txt b/8.15/A-Intervals/Template/test/out.txt new file mode 100644 index 0000000..01ba092 --- /dev/null +++ b/8.15/A-Intervals/Template/test/out.txt @@ -0,0 +1,7 @@ +## z:\Chao\src\Template\test\in.txt +2020/03/14 11:41:28.68 +Hello Easy C++ project! + +----------------------------------------------- +Process exited after 200 ms with return value 0 + diff --git a/8.15/A-Intervals/doc/Readme.md b/8.15/A-Intervals/doc/Readme.md new file mode 100644 index 0000000..4e768b5 --- /dev/null +++ b/8.15/A-Intervals/doc/Readme.md @@ -0,0 +1 @@ +# \ No newline at end of file diff --git a/8.15/A-Intervals/main.cpp b/8.15/A-Intervals/main.cpp new file mode 100644 index 0000000..01a55d4 --- /dev/null +++ b/8.15/A-Intervals/main.cpp @@ -0,0 +1,69 @@ +#include +#include +#include +#include +using namespace std; +const int N=5e4+5,N3=N*4,inf=0x3f3f3f3f; //RE N3=N*4add()һ֣ +int to[N3],ne[N3],w[N3],h[N],cnt=0,s=N-4,dist[N]; +bool in[N]; +queueq; +void add(int u,int v,int w1) +{ + to[++cnt]=v; + w[cnt]=w1; + ne[cnt]=h[u]; + h[u]=cnt; +} +void spfa() +{ + q.push(s); + while(!q.empty()) + { + int u=q.front(); + q.pop(); + in[u]=0;//spfaľ裡 + for(int i=h[u];i;i=ne[i]) + { + int v=to[i],w1=w[i]; +// printf("%d %d %d\n",u,v,w1); + if(dist[u]+w1u? maxn:u; + maxn=maxn>v? maxn:v; + } + //nǵmaxn + for(int i=0;i<=maxn;i++) + { + dist[i]=inf; + } + for(int i=0;i