diff --git a/algorithmic/problems/213/chk.cc b/algorithmic/problems/213/chk.cc index 1b0450d30..fb69361bb 100644 --- a/algorithmic/problems/213/chk.cc +++ b/algorithmic/problems/213/chk.cc @@ -59,7 +59,7 @@ int main(int argc,char* argv[]) root=merge(root,newnode(b[i])); while(tot--){ int u,v,x1,x2,x3,x4,x5; - x=ouf.readInt(); y=x+m-1; z=ouf.readInt(); + x=ouf.readInt(); y=ouf.readInt(); z=ouf.readInt(); if(x>y) swap(x,y); if(y-x+1!=m || x<=0 || y>n || (z!=0 && z!=1)) quitf(_wa,"Your answer is not legal"); diff --git a/algorithmic/problems/213/config.yaml b/algorithmic/problems/213/config.yaml index eb050889e..1bdf34e0b 100644 --- a/algorithmic/problems/213/config.yaml +++ b/algorithmic/problems/213/config.yaml @@ -5,7 +5,7 @@ type: default checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) -time: 2s +time: 5s memory: 512m # The subtasks section diff --git a/algorithmic/problems/213/statement.txt b/algorithmic/problems/213/statement.txt index 5d32a1d8d..52acb02ea 100644 --- a/algorithmic/problems/213/statement.txt +++ b/algorithmic/problems/213/statement.txt @@ -13,9 +13,11 @@ The first line contains a single integer $n$. The second line contains $n$ integers, representing the sequence $a$. Output Format: -The first line contains two integers $x$ and $m$, where $m$ represents the number of operations. +The first line contains a single integer $x$, the chosen segment length. -The next $m$ lines each contain three integers: the first two represent the shift interval, and the last one represents the direction, where $0$ means left and $1$ means right. +The second line contains a single integer $m$, the number of operations. + +The next $m$ lines each contain three integers $l$, $r$, $d$: the first two represent the shift interval (it must satisfy $r - l + 1 = x$, $1 \le l \le r \le n$), and the last one represents the direction, where $0$ means left and $1$ means right. Example: Input: diff --git a/algorithmic/problems/213/testdata/1.ans b/algorithmic/problems/213/testdata/1.ans index 62ea367b3..29c7001d2 100644 --- a/algorithmic/problems/213/testdata/1.ans +++ b/algorithmic/problems/213/testdata/1.ans @@ -1,3 +1,3 @@ -3 +2 1 -1 2 +1 2 0