修正循环错误
This commit is contained in:
parent
eef818e5c8
commit
f16758019b
|
@ -0,0 +1,3 @@
|
|||
# 标题
|
||||
|
||||
* 内容
|
|
@ -0,0 +1 @@
|
|||
#
|
|
@ -0,0 +1,6 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
|
||||
}
|
Binary file not shown.
|
@ -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
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
#include <iostream>
|
||||
#include <cstring>
|
||||
using namespace std;
|
||||
int nn, zhe, a[1000001] = { 0 };
|
||||
int tou = 0, wei = 0, f[1000001] = { 0 }, pai[1000001] = { 0 };
|
||||
|
@ -23,9 +24,11 @@ int main()
|
|||
}
|
||||
}
|
||||
cout<<endl;
|
||||
tou = 0, wei = 0, pai[1] = 0, f[1] = 0;
|
||||
/* memset(pai,0,sizeof(pai));
|
||||
memset(f,0,sizeof(f));*/
|
||||
tou = 0, wei = 0;
|
||||
for (int i = 1; i <= nn; i++) {
|
||||
while (tou < wei && i - f[tou] >= zhe) {
|
||||
while (tou < wei && i - pai[tou] >= zhe) {
|
||||
tou++;
|
||||
}
|
||||
while (tou < wei && f[wei-1] < a[i]) {
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue