QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#940571#8365. 重复搬题liujiameng100 ✓1ms3712kbC++144.2kb2025-03-17 20:47:572025-03-17 20:47:58

Judging History

This is the latest submission verdict.

  • [2025-03-17 20:47:58]
  • Judged
  • Verdict: 100
  • Time: 1ms
  • Memory: 3712kb
  • [2025-03-17 20:47:57]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
mt19937 rnd(844);
string s = "NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSESWSWNWNWNSWSWSWNNWNENENWNWENENEWNENEESENENEESSESESWESENENENEWNWNWNWENENESESESSWSWSESSWWSWSWESESESWSWWNWNWNWSWSWSESEENENNENESESEENNENWNNEESESNNNWWNWNWENENEENSWSSWSESSWSWSWSESESENENESESSWSWWNWWNWSWSWSWNWNNWNWNENENENEWNWWSWSNWNNENEWNWNWNWSWSSEWSWSWNWNENENENEESENENEESSEESSNENENENENWNWNWNWEENSSSESESWSWSWSESESSEWSWSWSEESENEESESENNENWNNWNNWNEENENNWWWNWSWSWSNNWWNWSWSSESWSWNNEWWNNWNWSWSSWSNWNWNEESESESENENENESESESESEWSWSSWSESESWSWNWWNNSSWWSESEENENENESESENNWNNEENNWNWWNWNWNWSWSWWSSWSEESSEENNENENSEESESESWSWWSWNWWSWWSWSESESENENENENWNWWWNWEESENESSESESSENNENENENNWNWNWNWWSWWNNEWWNWSSWNWSSWSESSWSSEEEWWNWNWNNEEWWNSWWSWSSESWSWNNWNNENENEESEEENNWENEESNENSESESSESWSWSEESENNENWWNWWWSWSWNWNWNENNEENEENESSNNWNWSNNWNWSWNWWNSSWSSWSSESSESWSWSEENESSEESENEEENENNENWNNEWNESSESESWSWSWSWWSWNWNWNNESSWSSWSWSESESEESEENENNESSWWNNWNWNNENENENNEWNWNWSSWSWNWNNWNWNWSSWSSESEESESESENENEWNESSEESESESESWEENNENESESSWSWSESWWWNWNWSWNNNWNNWNNWNENNENWNWNWWSSNWNENEENESEESENSSWSESWWWNNWNENNWNNESESENEEESSNNENWWNWWSNWWSWNNNEWSNWSSWSWNNENNWWSWNNENEWNEESESENEENEESSWSSWSESESESSESEENENEENWNNWWENNESESESWSWSWSWNWNWWSSWSWESSEESESNWWSWWNWNNSSESEWWWNWNENWENWNWNWSWNNENENEWNWNWSSSESWSSESESESSEESENEENSSWWWSWSWSWNNWWNWNNEENNENESEESNNWNWEENESESENNENENNWWNWNWWSSEWNWWNWSWSWSSWNNEENWWWWWSSSEESESWSWSSWSSEEENESESESESNNEESENENESESENWNWNWNWWNENEEWNWWWNEWNEESSENENENSESSEWSNNWNWSWSWNNWSWSESSWSWSSEEENENSWWSWSWNWNNEWNWSWSESSEEENEENSESESESENWSSEWSSWWNNNSWSWEESENEENEENNESESWSSSWWNNWWSNWNNENENENNENENSWWSSEESWSWNWNSWWNNEWNSWNWWNENEENENEESNESEENENNWEWSSWSWSSWSWSSEENWWWSWWNNNWWWESSEESSSESENESEEESSSWSWWSSWWWWEENSNENENWNWNWWNNWEENNWWNENEESSSESESSENENWNENENSSESESWSWWENEENNNENENWNNEESESSESENNWSWSSSWWSWSSWNWWNWNWSWWSSEWWNNEWWSSWNWNNSENNEESNNWNWSWSWNWNNEENEESENNENENEESSESESWSSESWWSWSSEESSWNWWSEESSNNEEESSNNWWNNENNNWWSWNWNENNENWWSWSSEWWSSEWWNWWSSSESENENNWWNWNENEESENEENNEENEESSESSSSWSWSSWSESEENEENWNWWNNNWNEENNWWWSWNWNWWWSWSSWWWNESESSEESSESWSWWSSWWWNNNWSWSWNWNNENEEWNNWNNWWSSWWNNSSSESEENEESESSWNWWSSWSSSEEEEENNSENEESESEENENWNWNEEENESEESWESSEEWNNENWWNNWWEESESESNNWWWNNNWWSWSWWWNNNENSSENEESEESSWSWNESESENNNWWNWSWSSWWSSNWWNSWSSSEEESSWWWSSNWESEEEENSNNEEENNNWWNWNWSWEEENNSSWWWSWNENNEWWWSWNNWNENEESSSSEWSSESEEWWSEENSSSWESNWNNNEENNNNWWWSNNEEENWWWSENNWWSWESSESEENWWSWNNENNWEENESEESWSEEESSWSSWSSWNWSWWNSWSWNWSESEEESSWWNWNNEEENNWNWNWWSWWSSSNNWWSESSEWSNWWSWSWNENENEENEEEEESSWSESSESSWEENNEEESEESWSWWSNWNWNEENNNWWWNSWWSWNENNENENSEENWNNEESNWWSWWSEESEESSWESENNENNNWNWWNWWEESWSSSWWNENWWNNENNNNWSESEEESSEESWNEESSSWWWSEEWSSESSESSSWWWSSWWSWNWNWNNNEEEEWSSSEESENNESESSENNNWNENENNEENNSSWNWNSSESSWNWWWWNWSWNNNWWSWSWSWSSEENNWWNNNENESSENNWNSWWNNNNEWWWWSSSWESWWSSSENNNNWNWSWSSSSWSSESSWSNWWNSSWNWWWNNNEESSESSWSSSESEENEEEENNWNNNNENNWWNNEENWSEEESSEEENWWWSSWSWWWWNWWSWENENEESSWSNEEWNNEESSWSESESSWSSSEEEENWNNNWWEEENSSWSSEEEWSWWWWWNWNNNENENWWNNEENWSWNWWSWNNSWWESSENWWSSEEWNNEEENEEESSWSSSWNENESSSENWWWWNWENWWSSSWESSNNNENNNNESESSWSSENNWWNNNSEEEEENNNENWNNWWNENNNWWSWWNWWSWWNENNESSWSSWSSESSSWWNNSESSEEEENNEWWSWSESEWNWWNWNWNNEEENEEEENENEESSSNEEENNSWSSSWNNNNNEWWWSSWSEEWSSEENESWSEENEEWSSSWSNNNWNWNENNEESEEWNNNNNNWWESSWWNSESSNEESSSWWWENNEESSSSESSSSNWWSEENEESWSSESSENENWWNNNNENNWWNNWWESEEEENNENNWNNNEWWWWSWWNWEESSWWSWNWWNWNWNWNNNNNWSESESEWSWSSESSWNNEENEEESNWWNWENENNWNWWWEESEEEEESESESSNEEESSSSWSWNWNWWSSESSEESSWSWNWNNSWWNWNNSSEESWSWNNWSSESSSEWWENNEESESESSNENNWNWNEEENEESSWNWSSEEWNNEEESSSWWNWWSSSWWSWWNENNNENNWWSNENEENEENEEESSSSENWWENNNWWWENWEEEEESWNNNEEEESWSWWSSWSWWWWESENNNNWWNNENEEESSSSSENNWWNWWWSSNNNWNNEEEEEEEEESSSWSEEEEENNNNNWWWWSSEESWSWWNWWWNNNWWSWSSSEEENEWNWSWWSSWWSWSSWWSSSEENNNNNENNNWWSESESEESEEENNNNNENNSESWWWWSWSSSWSSSWENEENENNNWNNWNNNEENENNENNWSWSSESSSWWWNNENNENNNNNEESESSSSSWNENNNWWNNWWNWSWSSEEESSWSWWSSSSESSWSSSSEESEEWWSSEEESEEEENEWWWWWNWNNNNENNNNENEESESWSSESSSSSSWWNNWWWSWSSWSSSSEEEEEEEENENNNWNNEEESSSEENEENNNNNNSWWWWSSEEEENEESSSESSSSSWSWWNWNNSSESWWESSSWWWWWWWNWWNNNNNENNNEESWNNNNNEEEEESSWWSSE";
int main()
{
	while((int)s.size()<10000) s += "EWSN"[(rnd()%4+4)%4];
	cout<<s;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #2:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #3:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #4:

score: 100
Accepted
time: 1ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #5:

score: 100
Accepted
time: 1ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #6:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #7:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #8:

score: 100
Accepted
time: 1ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #9:

score: 100
Accepted
time: 1ms
memory: 3712kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #10:

score: 100
Accepted
time: 1ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #11:

score: 100
Accepted
time: 1ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #12:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #13:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #14:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #15:

score: 100
Accepted
time: 0ms
memory: 3712kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #16:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #17:

score: 100
Accepted
time: 1ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #18:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #19:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct

Test #20:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:


output:

NWNWNWSWSWSESSESENEESSWSWNWWNSWNENENWNWWNNEEENENNWWWNSSWWSSESSESWSWWNWNNWENWNNENEENEENESESESSENNEENSSESESWSSWSWESEENENSESWSWSESEWWNWNWNWSWWNWNWNWSSESEESWSWSWNWNNENENNWNWNENENENENWNWWSWWNWNWSWSSEWSSSWSWSESESWSWSEESENEENENSEESESENENENNWNWNWNENENEESESESNNENWNWNWNWWSWSWNWNWNWSWSWSESESWSWSWSESESESENEENSE...

result:

ok Correct