Compare commits

..

2 Commits

Author SHA1 Message Date
6b4657fbe9 郁闷的小x(类似window) 2020-05-03 21:24:18 +08:00
ee1594623a 对决(未完成) 2020-05-03 19:53:24 +08:00
18 changed files with 6144 additions and 0 deletions

3
2715_yumen/Readme.md Normal file
View File

@ -0,0 +1,3 @@
# 标题
* 内容

1
2715_yumen/doc/Readme.md Normal file
View File

@ -0,0 +1 @@
#

BIN
2715_yumen/doc/郁闷.pdf Normal file

Binary file not shown.

47
2715_yumen/main.cpp Normal file
View File

@ -0,0 +1,47 @@
#include <cstdio>
#include <iostream>
using namespace std;
inline int maxs(int yi, int er)
{
return yi > er ? yi : er;
}
int main()
{
int n, m, a[100001] = { 0 };
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", &a[i]);
}
int num[100001] = { 0 }, id[100001] = { 0 };
int tou = 0, wei = 0;
scanf("%d", &m);
for (int i = 1; i <= m; i++) {
int x, y;
scanf("%d%d", &x, &y);
if (id[wei] > x) {
while (tou < wei && id[tou] < x) {
tou++;
}
for (int j = id[wei] + 1; j <= y; j++) {
while (tou <= wei && num[wei] < a[j]) {
wei--;
}
wei++;
num[wei] = a[j];
id[wei] = j;
}
} else {
tou=wei=x;
tou++;
for (int j = x; j <= y; j++) {
while (tou <= wei && num[wei] < a[j]) {
wei--;
}
wei++;
num[wei] = a[j];
id[wei] = j;
}
}
printf("%d\n", id[tou]);
}
}

BIN
2715_yumen/main.exe Normal file

Binary file not shown.

1003
2715_yumen/test/in.txt Normal file

File diff suppressed because one or more lines are too long

1003
2715_yumen/test/in2.txt Normal file

File diff suppressed because one or more lines are too long

1003
2715_yumen/test/in3.txt Normal file

File diff suppressed because one or more lines are too long

3018
2715_yumen/test/out.txt Normal file

File diff suppressed because it is too large Load Diff

3
2717_duijue/Readme.md Normal file
View File

@ -0,0 +1,3 @@
# 标题
* 内容

View File

@ -0,0 +1 @@
#

BIN
2717_duijue/doc/对决.pdf Normal file

Binary file not shown.

36
2717_duijue/main.cpp Normal file
View File

@ -0,0 +1,36 @@
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int ge,sai,pan[101]={0};
bool a[101][101]={0};
scanf("%d%d",&ge,&sai);
for(int i=1;i<=sai;i++){
int yin,shu;
scanf("%d%d",&yin,&shu);
a[shu][yin]=1;
}
for(int i=1;i<=ge;i++){
int now=1;
for(int j=1;j<=ge;j++){
if(a[i][j]==1){
now++;
}
}
if(pan[now]==0){
pan[now]=1;
}else{
pan[now]=-1;
cout<<i<<" "<<now<<endl;
}
}
int ans=0;
for(int i=1;i<=ge;i++)
{
if(pan[i]==1){
ans++;
}
}
printf("%d",ans);
}

BIN
2717_duijue/main.exe Normal file

Binary file not shown.

6
2717_duijue/test/in.txt Normal file
View File

@ -0,0 +1,6 @@
5 5
4 3
4 2
3 2
1 2
2 5

0
2717_duijue/test/in2.txt Normal file
View File

0
2717_duijue/test/in3.txt Normal file
View File

20
2717_duijue/test/out.txt Normal file
View File

@ -0,0 +1,20 @@
## z:\Chao\src\2717_duijue\test\in.txt
2020/05/03 ÖÜÈÕ 19:33:37.73
4 1
5 2
1
-----------------------------------------------
Process exited after 180 ms with return value 0
## z:\Chao\src\2717_duijue\test\in2.txt
2020/05/03 ÖÜÈÕ 19:33:37.73
-----------------------------------------------
Process exited after 70 ms with return value -1073741819
## z:\Chao\src\2717_duijue\test\in3.txt
2020/05/03 ÖÜÈÕ 19:33:37.73
-----------------------------------------------
Process exited after 70 ms with return value -1073741819