QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#386960 | #8554. Bot Friends | ucup-team087# | AC ✓ | 123ms | 4148kb | C++20 | 17.0kb | 2024-04-11 21:59:31 | 2024-04-11 21:59:35 |
Judging History
answer
#ifndef LOCAL
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
#endif
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define int ll
bool dbg=false;
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define pb push_back
#define eb emplace_back
#define a first
#define b second
#define bg begin()
#define ed end()
#define all(x) x.bg,x.ed
#define si(x) int(x.size())
#ifdef LOCAL
#define dmp(x) cerr<<__LINE__<<" "<<#x<<" "<<x<<endl
#else
#define dmp(x) void(0)
#endif
template<class t,class u> bool chmax(t&a,u b){if(a<b){a=b;return true;}else return false;}
template<class t,class u> bool chmin(t&a,u b){if(b<a){a=b;return true;}else return false;}
template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;
using pi=pair<int,int>;
using vi=vc<int>;
using vvi=vc<vc<int>>;
template<class t,class u>
ostream& operator<<(ostream& os,const pair<t,u>& p){
return os<<"{"<<p.a<<","<<p.b<<"}";
}
template<class t> ostream& operator<<(ostream& os,const vc<t>& v){
os<<"{";
for(auto e:v)os<<e<<",";
return os<<"}";
}
#define mp make_pair
#define mt make_tuple
#define one(x) memset(x,-1,sizeof(x))
#define zero(x) memset(x,0,sizeof(x))
#ifdef LOCAL
void dmpr(ostream&os){os<<endl;}
template<class T,class... Args>
void dmpr(ostream&os,const T&t,const Args&... args){
os<<t<<" ";
dmpr(os,args...);
}
#define dmp2(...) dmpr(cerr,__LINE__,##__VA_ARGS__)
#else
#define dmp2(...) void(0)
#endif
using uint=unsigned;
using ull=unsigned long long;
template<class t,size_t n>
ostream& operator<<(ostream&os,const array<t,n>&a){
return os<<vc<t>(all(a));
}
ll rand_int(ll l, ll r) { //[l, r]
//#ifdef LOCAL
static mt19937_64 gen;
/*#else
static mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
#endif*/
return uniform_int_distribution<ll>(l, r)(gen);
}
ll rand_int(ll k){ //[0,k)
return rand_int(0,k-1);
}
string rand_string(int n,char lw,char up){
string s(n,'?');
//rep(i,n)s[i]=rand_int(lw,up);
rep(i,n)s[i]="><?"[rand_int(3)];
return s;
}
int current_run_id,run_batch_size=1000;
int calc_random_limit(){
return current_run_id/run_batch_size+1;
}
template<class t>
void generate_single(t&a){
a=rand_int(1,calc_random_limit());
}
void generate_single(string&a){
int n;generate_single(n);
a=rand_string(n,'a','b');
}
template<class t,class u>
void generate_single(pair<t,u>&a){
generate_single(a.a);
generate_single(a.b);
}
//https://trap.jp/post/1224/
template<class... Args>
void input(Args&... a){
if(dbg){
(generate_single(a),...);
}else{
(cin >> ... >> a);
}
}
#define INT(...) int __VA_ARGS__;input(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;input(__VA_ARGS__)
#define ULL(...) ull __VA_ARGS__;input(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;input(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;input(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;input(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;input(__VA_ARGS__)
#define overload3(a,b,c,d,...) d
#define VI2(name,size) vi name(size);rep(i_##name,size)input(name[i_##name]);
#define VI3(name,size,offset) vi name(size);rep(i_##name,size)input(name[i_##name]),name[i_##name]+=offset;
#define VI(...) overload3(__VA_ARGS__,VI3,VI2)(__VA_ARGS__)
#define VPI(name,size) vc<pi> name(size);rep(i_##name,size)input(name[i_##name]);
#define VVI(name,sizeN,sizeM) vvi name(sizeN,vi(sizeM));\
rep(i_##name,sizeN)rep(j_##name,sizeM)input(name[i_##name][j_##name]);
#define VVT(type,name,sizeN,sizeM) vvc<type> name(sizeN,vc<type>(sizeM));
template<int i,class T>
void print_tuple(ostream&,const T&){
}
template<int i,class T,class H,class ...Args>
void print_tuple(ostream&os,const T&t){
if(i)os<<",";
os<<get<i>(t);
print_tuple<i+1,T,Args...>(os,t);
}
template<class ...Args>
ostream& operator<<(ostream&os,const tuple<Args...>&t){
os<<"{";
print_tuple<0,tuple<Args...>,Args...>(os,t);
return os<<"}";
}
ll read(){
ll i;
cin>>i;
return i;
}
vi readvi(int n,int off=0){
vi v(n);
rep(i,n)v[i]=read()+off;
return v;
}
pi readpi(int off=0){
int a,b;cin>>a>>b;
return pi(a+off,b+off);
}
template<class t>
void print_single(t x,int suc=1){
cout<<x;
if(suc==1){
if(dbg)cout<<endl;
else cout<<"\n";
}
if(suc==2)
cout<<" ";
}
template<class t,class u>
void print_single(const pair<t,u>&p,int suc=1){
print_single(p.a,2);
print_single(p.b,suc);
}
template<class T>
void print_single(const vector<T>&v,int suc=1){
rep(i,v.size())
print_single(v[i],i==int(v.size())-1?suc:2);
}
template<class T>
void print_offset(const vector<T>&v,ll off,int suc=1){
rep(i,v.size())
print_single(v[i]+off,i==int(v.size())-1?suc:2);
}
template<class T,size_t N>
void print_single(const array<T,N>&v,int suc=1){
rep(i,N)
print_single(v[i],i==int(N)-1?suc:2);
}
template<class T>
void print(const T&t){
print_single(t);
}
template<class T,class ...Args>
void print(const T&t,const Args&...args){
print_single(t,2);
print(args...);
}
template<class T>
void printvv(const vvc<T>&vs){
for(const auto&row:vs)print(row);
}
string readString(){
string s;
cin>>s;
return s;
}
template<class T>
T sq(const T& t){
return t*t;
}
void YES(bool ex=true){
cout<<"YES\n";
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void NO(bool ex=true){
cout<<"NO\n";
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void Yes(bool ex=true){
cout<<"Yes\n";
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void No(bool ex=true){
cout<<"No\n";
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
//#define CAPITAL
/*
void yes(bool ex=true){
#ifdef CAPITAL
cout<<"YES"<<"\n";
#else
cout<<"Yes"<<"\n";
#endif
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void no(bool ex=true){
#ifdef CAPITAL
cout<<"NO"<<"\n";
#else
cout<<"No"<<"\n";
#endif
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}*/
void possible(bool ex=true){
#ifdef CAPITAL
cout<<"POSSIBLE"<<"\n";
#else
cout<<"Possible"<<"\n";
#endif
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
void impossible(bool ex=true){
#ifdef CAPITAL
cout<<"IMPOSSIBLE"<<"\n";
#else
cout<<"Impossible"<<"\n";
#endif
if(ex)exit(0);
#ifdef LOCAL
cout.flush();
#endif
}
constexpr ll ten(int n){
return n==0?1:ten(n-1)*10;
}
const ll infLL=LLONG_MAX/3;
#ifdef int
const int inf=infLL;
#else
const int inf=INT_MAX/2-100;
#endif
int topbit(signed t){
return t==0?-1:31-__builtin_clz(t);
}
int topbit(ll t){
return t==0?-1:63-__builtin_clzll(t);
}
int topbit(ull t){
return t==0?-1:63-__builtin_clzll(t);
}
int botbit(signed a){
return a==0?32:__builtin_ctz(a);
}
int botbit(ll a){
return a==0?64:__builtin_ctzll(a);
}
int botbit(ull a){
return a==0?64:__builtin_ctzll(a);
}
int popcount(signed t){
return __builtin_popcount(t);
}
int popcount(ll t){
return __builtin_popcountll(t);
}
int popcount(ull t){
return __builtin_popcountll(t);
}
int bitparity(ll t){
return __builtin_parityll(t);
}
bool ispow2(int i){
return i&&(i&-i)==i;
}
ll mask(int i){
return (ll(1)<<i)-1;
}
ull umask(int i){
return (ull(1)<<i)-1;
}
ll minp2(ll n){
if(n<=1)return 1;
else return ll(1)<<(topbit(n-1)+1);
}
bool inc(int a,int b,int c){
return a<=b&&b<=c;
}
template<class S> void mkuni(S&v){
sort(all(v));
v.erase(unique(all(v)),v.ed);
}
template<class t> bool isuni(vc<t> v){
int s=si(v);
mkuni(v);
return si(v)==s;
}
template<class t>
void myshuffle(vc<t>&a){
rep(i,si(a))swap(a[i],a[rand_int(0,i)]);
}
template<class S,class u>
int lwb(const S&v,const u&a){
return lower_bound(all(v),a)-v.bg;
}
template<class t,class u>
bool bis(const vc<t>&v,const u&a){
return binary_search(all(v),a);
}
//VERIFY: yosupo
//KUPC2017J
//AOJDSL1A
//without rank
struct unionfind{
vi p,s;
int c;
unionfind(int n):p(n,-1),s(n,1),c(n){}
void clear(){
fill(all(p),-1);
fill(all(s),1);
c=si(p);
}
int find(int a){
return p[a]==-1?a:(p[a]=find(p[a]));
}
//set b to a child of a
bool unite(int a,int b){
a=find(a);
b=find(b);
if(a==b)return false;
p[b]=a;
s[a]+=s[b];
c--;
return true;
}
bool same(int a,int b){
return find(a)==find(b);
}
int sz(int a){
return s[find(a)];
}
};
vvc<int> readGraph(int n,int m){
vvc<int> g(n);
rep(i,m){
int a,b;
cin>>a>>b;
//sc.read(a,b);
a--;b--;
g[a].pb(b);
g[b].pb(a);
}
return g;
}
vvc<int> readTree(int n){
if(dbg){
vvc<int> t(n);
unionfind uf(n);
while(uf.c>1){
int a=rand_int(n);
int b=rand_int(n);
if(uf.unite(a,b)){
t[a].pb(b);
t[b].pb(a);
}
}
return t;
}else{
return readGraph(n,n-1);
}
}
void printTree(const vvc<int> t){
int n=si(t);
int degsum=0;
rep(i,n)degsum+=si(t[i]);
if(degsum==n-1){
//directed
rep(i,si(t))for(auto j:t[i]){
print(i+1,j+1);
}
}else if(degsum==2*(n-1)){
//undirected
rep(i,si(t))for(auto j:t[i])if(i<j){
print(i+1,j+1);
}
}else{
assert(false);
}
}
template<class t>
vc<t> presum(const vc<t>&a){
vc<t> s(si(a)+1);
rep(i,si(a))s[i+1]=s[i]+a[i];
return s;
}
vc<ll> presum(const vi&a){
vc<ll> s(si(a)+1);
rep(i,si(a))s[i+1]=s[i]+a[i];
return s;
}
//BIT で数列を管理するときに使う (CF850C)
template<class t>
vc<t> predif(vc<t> a){
gnr(i,1,si(a))a[i]-=a[i-1];
return a;
}
template<class t>
vvc<ll> imos(const vvc<t>&a){
int n=si(a),m=si(a[0]);
vvc<ll> b(n+1,vc<ll>(m+1));
rep(i,n)rep(j,m)
b[i+1][j+1]=b[i+1][j]+b[i][j+1]-b[i][j]+a[i][j];
return b;
}
//verify してないや
void transvvc(int&n,int&m){
swap(n,m);
}
template<class t,class... Args>
void transvvc(int&n,int&m,vvc<t>&a,Args&...args){
assert(si(a)==n);
vvc<t> b(m,vi(n));
rep(i,n){
assert(si(a[i])==m);
rep(j,m)b[j][i]=a[i][j];
}
a.swap(b);
transvvc(n,m,args...);
}
//CF854E
void rotvvc(int&n,int&m){
swap(n,m);
}
template<class t,class... Args>
void rotvvc(int&n,int&m,vvc<t>&a,Args&...args){
assert(si(a)==n);
vvc<t> b(m,vi(n));
rep(i,n){
assert(si(a[i])==m);
rep(j,m)b[m-1-j][i]=a[i][j];
}
a.swap(b);
rotvvc(n,m,args...);
}
//ソートして i 番目が idx[i]
//CF850C
template<class t>
vi sortidx(const vc<t>&a){
int n=si(a);
vi idx(n);iota(all(idx),0);
sort(all(idx),[&](int i,int j){return a[i]<a[j];});
return idx;
}
//vs[i]=a[idx[i]]
//例えば sortidx で得た idx を使えば単にソート列になって返ってくる
//CF850C
template<class t>
vc<t> a_idx(const vc<t>&a,const vi&idx){
int n=si(a);
assert(si(idx)==n);
vc<t> vs(n);
rep(i,n)vs[i]=a[idx[i]];
return vs;
}
//CF850C
vi invperm(const vi&p){
int n=si(p);
vi q(n);
rep(i,n)q[p[i]]=i;
return q;
}
template<class t,class s=t>
s SUM(const vc<t>&a){
return accumulate(all(a),s(0));
}
template<class t,size_t K,class s=t>
s SUM(const array<t,K>&a){
return accumulate(all(a),s(0));
}
template<class t>
t MAX(const vc<t>&a){
return *max_element(all(a));
}
template<class t>
pair<t,int> MAXi(const vc<t>&a){
auto itr=max_element(all(a));
return mp(*itr,itr-a.bg);
}
template<class A>
auto MIN(const A&a){
return *min_element(all(a));
}
template<class t>
pair<t,int> MINi(const vc<t>&a){
auto itr=min_element(all(a));
return mp(*itr,itr-a.bg);
}
vi vid(int n){
vi res(n);iota(all(res),0);
return res;
}
template<class S>
void soin(S&s){
sort(all(s));
}
template<class S,class F>
void soin(S&s,F&&f){
sort(all(s),forward<F>(f));
}
template<class S>
S soout(S s){
soin(s);
return s;
}
template<class S>
void rein(S&s){
reverse(all(s));
}
template<class S>
S reout(S s){
rein(s);
return s;
}
template<class t,class u>
pair<t,u>&operator+=(pair<t,u>&a,pair<t,u> b){
a.a+=b.a;a.b+=b.b;return a;}
template<class t,class u>
pair<t,u>&operator-=(pair<t,u>&a,pair<t,u> b){
a.a-=b.a;a.b-=b.b;return a;}
template<class t,class u>
pair<t,u> operator+(pair<t,u> a,pair<t,u> b){return mp(a.a+b.a,a.b+b.b);}
template<class t,class u>
pair<t,u> operator-(pair<t,u> a,pair<t,u> b){return mp(a.a-b.a,a.b-b.b);}
template<class t,class u,class v>
pair<t,u>&operator*=(pair<t,u>&a,v b){
a.a*=b;a.b*=b;return a;}
template<class t,class u,class v>
pair<t,u> operator*(pair<t,u> a,v b){return a*=b;}
template<class t,class u>
pair<t,u> operator-(pair<t,u> a){return mp(-a.a,-a.b);}
namespace std{
template<class t,class u>
istream&operator>>(istream&is,pair<t,u>&a){
return is>>a.a>>a.b;
}
}
template<class t>
t gpp(vc<t>&vs){
assert(si(vs));
t res=move(vs.back());
vs.pop_back();
return res;
}
template<class t,class u>
void pb(vc<t>&a,const vc<u>&b){
a.insert(a.ed,all(b));
}
template<class t,class...Args>
vc<t> cat(vc<t> a,Args&&...b){
(pb(a,forward<Args>(b)),...);
return a;
}
template<class t,class u>
vc<t>& operator+=(vc<t>&a,u x){
for(auto&v:a)v+=x;
return a;
}
template<class t,class u>
vc<t> operator+(vc<t> a,u x){
return a+=x;
}
template<class t>
vc<t> operator+(const vc<t>&a,const vc<t>&b){
vc<t> c(max(si(a),si(b)));
rep(i,si(a))c[i]+=a[i];
rep(i,si(b))c[i]+=b[i];
return c;
}
template<class t,class u>
vc<t>& operator-=(vc<t>&a,u x){
for(auto&v:a)v-=x;
return a;
}
template<class t,class u>
vc<t>& operator-(vc<t> a,u x){
return a-=x;
}
template<class t,class u>
vc<t>& operator*=(vc<t>&a,u x){
for(auto&v:a)v*=x;
return a;
}
template<class t,class u>
vc<t>& operator*(vc<t> a,u x){
return a*=x;
}
template<class t,class u>
void remval(vc<t>&a,const u&v){
a.erase(remove(all(a),v),a.ed);
}
//消した要素の個数を返してくれる
//UCUP 2-8-F
template<class t,class F>
int remif(vc<t>&a,F f){
auto itr=remove_if(all(a),f);
int res=a.ed-itr;
a.erase(itr,a.ed);
return res;
}
template<class VS,class u>
void fila(VS&vs,const u&a){
fill(all(vs),a);
}
template<class t,class u>
int findid(const vc<t>&vs,const u&a){
auto itr=find(all(vs),a);
if(itr==vs.ed)return -1;
else return itr-vs.bg;
}
template<class t>
void rtt(vc<t>&vs,int i){
rotate(vs.bg,vs.bg+i,vs.ed);
}
//Multiuni2023-8 C
//f(lw)=false,...,f(n-1)=false,f(n)=true,...,f(up)=true,
//のときに n を返す
template<class F>
int find_min_true(int lw,int up,F f){
while(up-lw>1){
const int mid=(lw+up)/2;
if(f(mid))up=mid;
else lw=mid;
}
return up;
}
//f(lw)=true,f(up)=false
template<class F>
int find_max_true(int lw,int up,F f){
while(up-lw>1){
const int mid=(lw+up)/2;
if(f(mid))lw=mid;
else up=mid;
}
return lw;
}
template<class t> using pqmin=priority_queue<t,vc<t>,greater<t>>;
template<class t> using pqmax=priority_queue<t>;
using T=tuple<int,int,int>;
int brute(const string &S) {
const int N = S.size();
vector<int> dp(1 << (2*N+1), -1);
dp[0] = 0;
for (int p = 0; p < 1 << (2*N+1); ++p) if (~dp[p]) {
// bot i+0.5
for (int i = 0; i < N; ++i) if (!(p & 1 << (2*i+1))) {
if (S[i] == '?' || S[i] == '<') {
for (int j = i; ; --j) {
assert(j >= 0);
if (!(p & 1 << (2*j))) {
chmax(dp[p | 1 << (2*i+1) | 1 << (2*j)], dp[p] + ((j != i) ? 1 : 0));
break;
}
}
}
if (S[i] == '?' || S[i] == '>') {
for (int j = i + 1; ; ++j) {
assert(j <= N);
if (!(p & 1 << (2*j))) {
chmax(dp[p | 1 << (2*i+1) | 1 << (2*j)], dp[p] + ((j != i+1) ? 1 : 0));
break;
}
}
}
}
}
return *max_element(dp.begin(), dp.end());
}
const int nmax=5010;
int dp[2][nmax][2];
int eq[nmax];
void slv(){
STR(s);
int n=si(s);
vi a(n);
rep(i,n){
if(s[i]=='>'){
a[i]=0;
}else if(s[i]=='<'){
a[i]=1;
}else{
a[i]=-1;
}
}
int cur=0,mx=n;
rep(j,mx+1)rep(k,2)dp[cur][j][k]=-inf;
rep(i,n+1)eq[i]=-inf;
eq[0]=0;
rep(i,n){
int nx=cur^1;
rep(j,mx+2)rep(k,2){
dp[nx][j][k]=-inf;
}
chmax(dp[cur][0][0],eq[i]);
rep(j,mx+1){
if(a[i]!=1){
//up
rep(k,2)chmax(dp[nx][j+1][0],dp[cur][j][k]+1);
}
if(a[i]!=0){
//down
if(j-1>=0)chmax(dp[nx][j-1][1],dp[cur][j][1]+1);
if(j-2>=0)chmax(dp[nx][j-2][1],dp[cur][j][0]);
if(j-1>=0)chmax(dp[nx][j-1][1],dp[cur][j][0]);
chmax(dp[nx][j][1],dp[cur][j][0]);
}
}
chmax(eq[i+1],eq[i]);
chmax(eq[i+1],dp[nx][0][1]);
cur=nx;
}
if(dbg){
int god=brute(s);
int ans=eq[n];
if(god!=ans){
print(s);
print(god,ans);
}
assert(god==ans);
}
print(eq[n]);
}
signed main(signed argc,char*argv[]){
if(argc>1&&strcmp(argv[1],"D")==0)dbg=true;
cin.tie(0);
ios::sync_with_stdio(0);
cout<<fixed<<setprecision(20);
if(dbg){
while(1){
if(current_run_id%run_batch_size==0){
cerr<<"Current Run "<<current_run_id<<endl;
}
slv();
current_run_id++;
}
}else{
int t;cin>>t;rep(_,t)
slv();
}
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3616kb
input:
10 ?>? >?< ??<? ?><?< ?????? >?<?<>?<?< ?><???><>< ??>>><><?? <>>?>>?>?> <?<>>??<?>
output:
2 2 3 4 5 8 7 8 5 6
result:
ok 10 numbers
Test #2:
score: 0
Accepted
time: 40ms
memory: 3652kb
input:
100000 >?<?<>?<?< ?><???><>< ??>>><><?? <>>?>>?>?> <?<>>??<?> >><>><<<<< >?>?>?<<>> ?><?<<?<>< ???><>?>?> <??>?<<><? ??>><?<>>> <><><?<>>? ?>>?>???>< ?<?><?<<>? >>><?<??>< ><><<>?>?< >?><>><<<? >??>?><?<> ?????<><?> <><<?<<>?< ><?>>?>?>? ?><><<<>>? ?<>?<>?<<< <><<<<<>>> ?>?>?><<>> <>?<>><>?< <<<?<>>...
output:
8 7 8 5 6 8 6 7 6 7 6 6 8 7 8 7 8 7 7 6 6 7 7 2 6 6 3 9 6 6 5 7 5 8 7 6 8 7 8 6 6 7 4 2 7 6 8 7 8 6 6 5 7 8 8 8 8 7 5 6 7 7 6 8 8 6 8 6 7 8 7 7 6 8 5 7 6 6 5 5 7 7 6 4 8 6 6 7 5 7 6 7 7 8 3 8 8 7 8 7 7 4 8 8 7 5 8 7 7 8 8 7 5 7 8 5 7 6 5 8 8 7 7 8 6 7 8 6 6 8 7 8 7 6 6 5 7 8 6 8 6 7 5 7 4 6 6 7 7 7 ...
result:
ok 100000 numbers
Test #3:
score: 0
Accepted
time: 40ms
memory: 3624kb
input:
100000 <<<<>>>>>< >>>><<<><< >><?>><<<< <><><<>?<> ><>?>>?<>< <<<<><><>< >>>??<><>< <<><?>?<<< >?<<<><<<< <<>><<><>< <>?<<<<>>< >>?>>>><>> ?>><<?<<<< >>>><><??< ><<<<<><<< ><???<>><> <<<<><<<>> ?<>>?>?<<< <><>><><>> <>><<<<>>< <<>><<<<>> ><><<<<?<< ><<<<<><>> >>>><<><?> ><>>?><?<< ??<?<??<<? <<<<><<...
output:
2 8 8 5 7 3 7 6 6 5 6 4 8 8 4 6 2 8 4 6 4 6 3 7 8 8 3 4 5 7 5 8 7 6 5 6 5 5 6 6 5 7 3 4 7 6 6 5 8 7 5 3 6 4 6 6 3 4 6 6 8 6 6 6 7 4 4 6 6 6 1 5 4 7 6 5 6 4 4 4 5 5 4 6 8 7 4 6 4 4 5 4 7 8 6 6 6 6 4 7 5 6 4 6 6 7 4 2 5 5 6 5 6 6 5 6 4 4 3 8 5 7 5 6 6 6 5 5 7 8 7 5 4 4 5 6 7 5 3 5 5 3 7 7 2 7 6 8 7 2 ...
result:
ok 100000 numbers
Test #4:
score: 0
Accepted
time: 100ms
memory: 3612kb
input:
100000 >>>??><<>?<>??>><>?< >><<>????<<<>?>>?<<< <>>??><><>>?>>?><>?> <<<<><>><>>>???>>>?< <>>>?<>>>?<><??<<<>> >><><><><?<>>><>??>< >?<>?????<?<<><<<<>> ?><<>?>??>>>??<><<?< >>><>?<?>>?<?<??>?>< <>>?<<?>???><?><><>? <>?<?>?>?<>?<????>?< <??<>?<>><<?<?????<< >?>?<><>?<><><>>>??> >?<??>?<??>>>>><><?<...
output:
15 17 12 12 14 13 15 17 15 14 15 15 13 16 15 16 15 15 17 15 15 10 16 12 14 16 17 16 11 14 13 14 13 14 14 10 12 11 15 13 16 13 13 13 16 10 14 16 12 12 13 14 14 16 17 13 15 15 11 17 15 15 16 15 17 15 16 14 14 13 11 15 14 17 15 17 17 15 13 17 16 16 16 14 17 14 12 14 13 15 16 12 15 16 14 15 13 16 15 14 ...
result:
ok 100000 numbers
Test #5:
score: 0
Accepted
time: 88ms
memory: 3568kb
input:
100000 <<>?>>?<>?<>><<<<<>< <>>><<>><><><><<>?>> ><>?<<>><>?<>>><><<> >>>><?><<<<><<<?><<< >>?<><>>?>??<>><<>>< >>?><<?<<><?><<<<>>> ><?<<><>><<?<?>><>?< <><<<?<><<<<<<<>><>< <<><><><>><<<>>>><>< >>>><<?<><<<<><<<>>> <<<><>><<><<>?<<<<>> ><>><>>><>><>?<><??< ?<<><?>><><><><<><>< <>>><><<><?<<<>><><>...
output:
14 11 13 16 15 14 14 9 11 13 11 14 12 13 14 16 10 13 15 12 11 10 8 13 13 11 16 13 14 13 10 14 13 14 13 15 11 11 14 13 12 13 11 11 13 12 10 13 15 13 13 14 6 14 14 8 11 8 14 12 11 10 12 14 14 13 10 13 9 15 16 7 11 14 12 12 12 12 12 15 12 14 10 13 11 14 13 14 14 11 9 12 13 11 12 11 11 16 13 11 13 15 15...
result:
ok 100000 numbers
Test #6:
score: 0
Accepted
time: 113ms
memory: 3624kb
input:
100000 ?>???<<><>?>?>>>><<>? ?>?>>?>><<><??<?<?>?? <><<?>>?<>?<>>?><???? >?<<<?><?>?><>>><>><< <???>?<>???<><<<<<??> ><<?<<<<<<<<<<<?>><<? ?<?>><?<?>?<>??><><>< ?>?<?>>>><<?>??><>>>> ><<<????>>><>>>><<??> <??><??>><<?<?<>>?><> >><>>>><>>?<?<>?>><>> ??<?<<><?>?>>>??><>?> >?<<<?<?><<??><>>?<?? <<>?<?>...
output:
15 18 16 15 16 9 15 13 15 15 14 14 16 16 18 14 16 14 19 16 11 13 14 15 14 17 12 14 14 12 15 16 16 15 18 15 15 16 17 16 14 17 17 15 13 16 14 14 13 16 15 14 16 16 18 14 15 14 15 14 13 17 13 17 13 16 15 15 17 18 18 15 13 15 17 15 17 14 16 14 15 12 16 16 14 17 17 16 18 14 15 14 18 15 15 16 17 15 16 19 1...
result:
ok 100000 numbers
Test #7:
score: 0
Accepted
time: 96ms
memory: 3564kb
input:
100000 <><><><<>><>>><>?<<?> <><<>><>>>>><>><<>?<? >?<<>>><>>>><?<<<>><< >>>><<<<<<>><>>>><<>> <<>>><<>><<?><?>>>><< <<<<><??><<><>>>?>?>> >><><>?>><><<<>>><<>? ><<<>>><<><<><><><>>< >>><>>?><<<<?><<<<<?< ?<>>><<><<><><<>><<>< <<><<<><<<<>>>>>>>>>> <?<><<>><><>>><<>>><> <<>><><>>><><>>><<><< ><<><<>...
output:
13 15 17 14 14 10 15 13 18 14 4 12 13 13 12 15 14 14 14 12 14 15 14 10 12 11 15 6 14 14 14 12 17 14 12 16 13 14 13 8 12 14 13 14 12 15 14 14 14 12 17 17 15 12 14 15 13 12 13 16 13 16 16 14 15 15 17 11 14 13 11 12 12 10 14 14 15 12 12 15 13 14 14 12 15 15 15 10 15 16 15 13 16 14 14 10 18 10 14 11 8 1...
result:
ok 100000 numbers
Test #8:
score: 0
Accepted
time: 123ms
memory: 3912kb
input:
100000 ??><>?<?><<<<>>??>><<< ?<><><<??<<<>><?><>?<> <><<>?><>?>><>??>?<<?> >>><??<?<>>>>>><??><<? >?<<><??<>?>>?<<?>>?<> ?<?>?>?<><?>?<?<?>>>?< ?<?<<><<<?<>>?<><<><>? ?>>><?<<>?>>>?<??>>?>> >>???>???<>?<??><?>?>< ?>>?>>>><>>?><>?>?<<>? ><?<?<<<?<<?<>??<>>?<< >?<?<<<<???<?<<?<<?<<< >><>>>><<>>?>?>??...
output:
17 14 15 18 16 17 14 17 17 16 15 16 16 15 17 16 18 13 13 15 16 17 18 16 16 18 14 19 18 15 18 17 16 17 16 16 18 17 17 17 16 16 14 17 15 16 18 16 16 18 16 17 16 17 16 12 17 15 17 16 16 16 17 16 16 18 17 16 18 18 15 17 19 18 19 17 16 15 17 17 16 16 18 13 12 19 17 19 16 16 18 16 17 18 14 15 16 18 10 14 ...
result:
ok 100000 numbers
Test #9:
score: 0
Accepted
time: 106ms
memory: 3612kb
input:
100000 ?><?><<<?<><<<>>><<>>> ><><<<>?><><???>><>><< <><>>><>>>>>>>>>><<><< <>>>><<<<<<><<<<<>>?>< ><<><>><?>>>>><>>><>>< <?<<<<<>><<>>>>><?<><< <?<<<><<>>>>><<<><>>>< ><<><<>><<<<><<><<>>?< >><<<><<<<<>>>>><<?>>< >?<<?<<<?<<<<<>?<<<>>> <>?<>>>?<><><>>>><><<> ><<?<?<<<<>>><><<>><<? <>>><>?>>>><><>>>...
output:
14 16 11 13 12 14 14 15 14 12 14 15 14 13 13 15 15 16 17 11 16 15 17 17 14 16 12 13 15 16 11 17 14 18 16 16 16 14 13 13 14 16 16 16 17 16 16 16 15 15 16 10 9 14 16 16 13 14 16 15 16 14 13 17 16 16 17 15 17 13 14 12 13 11 10 13 14 15 11 15 17 13 17 14 16 12 15 11 15 15 14 15 12 16 17 14 17 16 12 13 1...
result:
ok 100000 numbers
Test #10:
score: 0
Accepted
time: 87ms
memory: 3616kb
input:
20000 ?<?><??>>?<?><<>>?>?>?>?<<<><???<?<<<><?<?<>>?<><> ????><??><>??<><????><>?<>?<?><<<><>?<>??<?<<?><<> >?>>?>>>>>>?<<??<??<?<?>>><??<<>>>?<<?<<>?<<<>>><? ?<<>>?>>><?><<><?><>>?><?<<?<>????<>><<<<?>><<>??< ?????>>>>?>?><<>??>>>?<><?>><??????>>>?<>??>>????? >>>?<?<<?<>>>????<<?>><><>>><>?<?<>><>>...
output:
40 37 45 40 43 40 38 40 37 41 42 35 41 40 38 40 37 39 40 39 40 42 42 41 43 39 35 41 41 39 40 41 35 42 38 40 37 39 41 38 37 39 37 42 38 40 42 37 43 42 41 38 41 41 40 42 42 39 36 41 42 45 40 41 38 37 37 37 38 37 41 39 39 42 38 40 37 39 40 37 42 38 41 40 39 37 39 40 37 38 39 37 37 41 37 39 39 39 42 38 ...
result:
ok 20000 numbers
Test #11:
score: 0
Accepted
time: 78ms
memory: 3684kb
input:
5000 <<???<<?<>>>?<<<<>?<><>?><??<?<><<><?><>>><<><?>>?>>?>??>?>>?<<?<<<?>?><>><<<>>>?<<<<<>??>>>>?><>>?< >?<>?>><?<?>>??>????>>??>?>????>>?>>???>????<?><<>><<<<>?<<?<??><>><?<?<>??<<>>><<<<<?>>??<?<<>>>?>> <>><?><???>??<?????><><?>><?>><???<?<><?<>?<???<<?>>????>?<?<<><<<>>?>>?><>??<?>?<><>><??<>>?...
output:
80 85 82 88 78 78 81 79 86 79 80 79 82 76 81 78 84 78 80 81 82 80 81 78 81 87 81 85 83 85 84 83 82 79 82 83 82 83 82 84 78 81 77 77 84 82 74 83 80 80 83 84 80 80 75 81 80 82 81 83 79 78 82 85 80 82 85 83 81 79 84 80 86 84 82 79 81 78 83 81 82 83 77 83 84 85 81 81 79 83 84 85 83 82 84 84 78 77 83 74 ...
result:
ok 5000 numbers
Test #12:
score: 0
Accepted
time: 70ms
memory: 3692kb
input:
1250 ><?>?<>><?<<???<?<>>>????><>??<><<><>??<<<><>???<?>?<<?<>?<><??<>><<>>><<>??<<<???>><??><?>><???>?>?><??>?<<?>><>><<>>><>><<??<<><<<<>???><??????<><><?>?<?<??<<><>??>??><?>?<><><<??<<><><?>>?><??<?><? <><>?>?>?<?<<><?>?<><>?<?><>>><<>?><<?<><><><?>?><?<>>?<<>??<??>?>?<>>?<?>?<<????>?>><><???><?...
output:
160 161 165 168 165 171 172 164 161 162 165 167 164 165 164 166 157 163 168 166 164 169 165 167 167 167 169 163 164 167 173 161 161 163 167 160 166 165 165 163 167 162 168 168 163 161 160 163 169 166 168 165 167 172 167 165 171 163 163 166 164 167 165 165 167 167 167 166 161 165 163 167 163 163 162 ...
result:
ok 1250 numbers
Test #13:
score: 0
Accepted
time: 68ms
memory: 3572kb
input:
800 ><<?<><>?>><?<<?<<>>><<>><<>?>>>??><?>><?><<<?<>><>?><>><><?<<<<<?>><>>?<><<>??<??><<>><>???>??><???>???>?<?<<>>??<>>?<?>??<<??<<><<>>?><<?<>?><><<<>?><>?<>>>>?<?<><<?<?><<>>>?>>><>???<?><>>><><?<<><>?<????>?>?>???>?><>>>><???<<??<<<?<>?><>>?><>>??<> >?<<<???<<>??<><<>?>?<<?>?<>><<><>?<?<><??<>>...
output:
203 211 202 204 201 205 206 204 209 203 204 211 199 204 209 211 209 206 207 208 206 208 208 209 209 202 202 206 208 204 209 209 206 207 198 207 212 203 206 205 199 210 209 207 213 206 204 207 202 210 206 202 213 205 208 205 198 206 198 200 204 202 212 210 207 208 199 205 208 206 203 206 203 213 210 ...
result:
ok 800 numbers
Test #14:
score: 0
Accepted
time: 53ms
memory: 3688kb
input:
400 >><>?????<><<>>???<??????<<??>>>><??<<<<?>>?>???<>><?><<><<?>???<<?>?<>?<<<?>>??><<?>>>>?>??<??>>??>???<?<><<>?<>>???<>>?>><<?<<><???<<<<??<?<><?<<<<?<>??>><?<><??<?>?><>?<<?>>?><<??<<>><<<><>>><<>>>><?><>??<>><>>?<<<>??>>?>??><?<<??<<?><?<>>?>?<><??<>?<<<<<>?<?<?<<???><?<?<<?<<?>?<<><>??>>>??>>...
output:
266 252 253 255 257 261 260 264 256 258 263 252 256 262 258 257 259 259 258 257 253 254 261 262 262 256 260 264 256 264 265 246 267 266 258 254 263 252 262 252 264 258 259 254 257 263 255 259 254 257 258 259 252 261 260 263 255 259 254 257 252 256 259 259 255 259 252 262 260 254 258 261 254 257 255 ...
result:
ok 400 numbers
Test #15:
score: 0
Accepted
time: 65ms
memory: 3704kb
input:
200 ???><???>><<<?>>?<><?<>><<>>>>??<?><<>>>>????<<>>>?><><?<><><????<<><?><<???>>?>???><?>><?><<><>>?>??<<<<?>?<?>>?>?>><><>><<?<<>>><<?>>>?>>>?<?<<<<><><>>???<<??>>?>><??>?????>><<><>><<<???<>><<??<>?><><>?>><<<<><><<>?><><?<>?>>?<?>???<?><?<???>?<<<<<<??<><><?>><?<?>>>?<?<<???>?>?<<?<?<?<?>?<>??>...
output:
413 409 412 417 407 412 417 423 416 406 414 418 419 421 419 408 418 409 412 429 425 409 409 424 406 409 415 413 411 407 416 410 410 421 423 402 415 415 416 415 417 409 412 414 416 406 417 407 412 421 413 417 416 419 409 405 409 420 421 408 420 413 408 421 415 410 420 406 406 419 413 413 425 418 417 ...
result:
ok 200 numbers
Test #16:
score: 0
Accepted
time: 64ms
memory: 3888kb
input:
50 ?>?<>>>><?>>?<?>>>?>??<<<<>>>>?><?<??>><<>?<<??<>??<?><>><?>?<><?<<><?><?<<>??>>>???>?>>><>?<>?<>>?<?>>???><><?<>????>??<?>><<?><><><<><><><?<><><<??><>?>>><<<<??>><><><????>??<<<<<?>????<?><<<><<<<<>><>><><><>?>?><>??><<<<><<?>?<<?>><><?>>><<>?>>?>>>>?><?<><?><<><>>?<><<<?<<>?<<<?>?>>??<<?>?<<><...
output:
826 834 826 828 834 824 832 831 839 829 826 826 826 841 837 824 835 834 826 832 824 837 842 850 846 829 830 840 833 823 828 833 826 841 820 830 845 833 811 831 816 841 831 816 839 822 830 840 840 829
result:
ok 50 numbers
Test #17:
score: 0
Accepted
time: 69ms
memory: 3732kb
input:
8 <>?>?<><??<??>>><?>?><<<>???><><<>><>>>?<>?<>><<<??>>??><><???<><<>??<?<<?>>?<>?<?><<>?>?<????<>?<>>><?????><>>??><?<><>?>><???<?>??<??><?<?>??><><??<><>???>?><<<?>?<<><???>><<?>>>>>>>>?>?><?><<>><??>??>>>??<<<<><><<?>><?<?<>><>?<><<?>???<??>??>>??<?<<<>?>?<?<>>?>><??>?>???<???<>???<?><<?>???>??>?...
output:
2076 2077 2071 2063 2076 2073 2084 2070
result:
ok 8 numbers
Test #18:
score: 0
Accepted
time: 71ms
memory: 3852kb
input:
2 >?<>><>>><><>?<<?><??<?><??<?<??<??<??<<?>>?><<>>??<<<<<??><????><>?<>???<?>??<??>>??>????<><<><<?<<?<><<><??><?<?>>?<<><><??><??<>??<<?>>>??<><>?<?<?>><??<>>>?<<?<<<<?<<??<??<><><????>??<?><<<>><?<??<<>>?<<<<><>>??<<><?<?<<>>?<?<<?<?>><>?<??>><<<<><>><>>????>><<>??<<<?<?>><?<><?<>?>>?>??>?>>>???<...
output:
4168 4153
result:
ok 2 number(s): "4168 4153"
Test #19:
score: 0
Accepted
time: 89ms
memory: 3728kb
input:
530 ? ?? ??? ???? ????? ?????? ??????? ???????? ????????? ?????????? ??????????? ???????????? ????????????? ?????????????? ??????????????? ???????????????? ????????????????? ?????????????????? ??????????????????? ???????????????????? ????????????????????? ?????????????????????? ?????????????????????...
output:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 10...
result:
ok 530 numbers
Test #20:
score: 0
Accepted
time: 26ms
memory: 3680kb
input:
530 > >> >>> >>>> >>>>> >>>>>> >>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 530 numbers
Test #21:
score: 0
Accepted
time: 90ms
memory: 3948kb
input:
150 ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...
output:
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 ...
result:
ok 150 numbers
Test #22:
score: 0
Accepted
time: 29ms
memory: 3660kb
input:
150 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok 150 numbers
Test #23:
score: 0
Accepted
time: 96ms
memory: 3936kb
input:
2 ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...
output:
4998 4999
result:
ok 2 number(s): "4998 4999"
Test #24:
score: 0
Accepted
time: 38ms
memory: 3848kb
input:
2 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...
output:
0 0
result:
ok 2 number(s): "0 0"
Test #25:
score: 0
Accepted
time: 90ms
memory: 3760kb
input:
50 ????????????????<<>??<???<?????<????????????>??????????????????????????>??<?????????<?????????>????????????????????????????????<????????????????>?????????????>????<?<?<?????<?????>???????????????????????????????>???<??????????<??????????>??????>?????????>????????>????????????>?<?<????????????????...
output:
975 976 970 971 974 975 971 971 974 969 974 978 974 969 969 971 980 978 974 974 975 966 972 976 970 976 969 970 970 976 976 974 981 978 972 975 977 974 976 972 980 969 970 971 974 971 972 977 974 970
result:
ok 50 numbers
Test #26:
score: 0
Accepted
time: 94ms
memory: 4028kb
input:
8 ??????????<????????????????????????????>???<?????<?????????>????<???????????????>?????????????>>?????????????????????<???????>?????????????>???????????????????????>?????>????>>????>??????????????????????????????<???????<????????<??????????????>????????????????????????????????<>??????>?????????????...
output:
2440 2434 2439 2437 2433 2425 2443 2431
result:
ok 8 numbers
Test #27:
score: 0
Accepted
time: 95ms
memory: 3852kb
input:
2 ???????????>???>?<??????<??????????<?<???????????????????????????????>??>????????>????????????????????<>??????????>???????????????????>>????????????>??????????????>??>?????????????????????????<???????<?????????>??<???????<??????????????????????<???????<?????????????>??????????????<????????????????...
output:
4872 4882
result:
ok 2 number(s): "4872 4882"
Test #28:
score: 0
Accepted
time: 63ms
memory: 3720kb
input:
50 <<><?>><?>??<?<?<>?><>><?>><???<><?<>?<<>>?<<<<<????<>???><??<>>??>>?<?<<?<?<?>>?<>?>>><<<<>><><>??>??<?<>><><?>><>?><<>?>>><??>?<?><>?<<?>?<<<>>><??><>><><<<<??>>??>??>><><<><>??<<<<<>?>><>><>?<<?>>>??<<<<?<<<<>>?>?<?><?<><<?>?>>?><<??<?<?><<?<??<<<?<>?>?>>?<>><<>>>>><><?>>>?>?<>>>><<??><??<<<><...
output:
815 810 820 814 833 836 822 838 830 830 830 824 823 826 821 825 809 817 817 832 815 816 829 819 822 806 829 822 824 831 823 823 820 821 825 820 814 828 832 822 827 825 834 823 830 815 840 842 822 830
result:
ok 50 numbers
Test #29:
score: 0
Accepted
time: 67ms
memory: 3744kb
input:
8 <<?>??>?><?<?<?>????<>><?<<<<<<<?>>??<>?><><>>><><>?><>??<<?<?>>??<<><>>>>>?>><>>?<><?<??<><<?><?><>?>??><>><><><<?????><?>>?><?><<<><?><<><<><><><?>?><?>>??<?<><>>>>???<<?<<<>?>><?>?><<<??>??>><???<<??<?><>><>>><<<><?<???>><?<<?<?<<>???<<><<>>?>><<?<>??>><??<?<?<<>?>?>>>?<<><>>???>><?<<<?>>?<?<<<...
output:
2054 2069 2058 2043 2057 2070 2055 2063
result:
ok 8 numbers
Test #30:
score: 0
Accepted
time: 70ms
memory: 3844kb
input:
2 ?>>?<?<?><>><<>>>??>?<>?<>>><???>>?>>><><><>>?<>?<<?>?<>?<><>?>?<<>>><<<<<??>><?<>??<?<<???>>>>?>><><<<><>>>?<>><>><?><?>>???>??<>??>??<?<?>?<?>>?><<>>??>?<?<<???<>><?>>?<<<<><?>><<<<>><?><???<?<><<<<?>>><>??>?>><?<??<?<?>??<><<???><><<?<<<<<<>?<>>>>?<><<<??<?>>???><>>?><?><??><???>??<<?<<<>>??>><...
output:
4105 4137
result:
ok 2 number(s): "4105 4137"
Test #31:
score: 0
Accepted
time: 59ms
memory: 3720kb
input:
50 <<<<<<?>><><?<?<><<>>><?>?>?<>?<>><?<>>><<>?<<>>??<><<<><>>>><?<<?>><<?<>>>?><?><>>><<<<<<?<<<<>><>>?><?<>><<><?<><><<<>><><>><<>?>??><><?>>>><<<<><??<?><>><><>?>><><?>><<<>>><<?>><>??>?<><>>>>>>>?>>>>><>?<<?<<>?<>?<?<?><?>>>><><<<>><>><<<><>??>><<?<><<>>><>>??<??<>>>><>>><>?<><<<<>><?<><?<>><<>?...
output:
794 791 807 783 795 793 788 808 796 811 806 800 813 797 807 793 780 792 792 784 789 805 783 795 788 795 802 804 807 798 806 803 798 805 802 795 803 802 792 801 803 804 790 809 793 809 804 788 807 792
result:
ok 50 numbers
Test #32:
score: 0
Accepted
time: 63ms
memory: 4036kb
input:
8 <<<<?><<<?>?><<><><<>><>>><<>>><<>>><><<<><>>>?>>><??<<>?<??>><><>>?>>>>><?<<><><<<<?<<<<>>>><??<<<><?<<?>?<<><<<<>??<>?>><><<?<>>?<><?<>>?<<??<>?><?>>><?>?<>?<<?<><>????>><??>>><>?>>><<<>>><?<><><><<><>><<?<><<><>?><??<<?><?>>><<<><?>>?<>>>>>><<<?>>>>?><><>>?<><<>><<>><?<<<<?>?<?<<><><?<?????<><>...
output:
2008 2014 2000 2014 1997 1985 1999 1995
result:
ok 8 numbers
Test #33:
score: 0
Accepted
time: 66ms
memory: 4112kb
input:
2 <><<><<?<<<<<>?><<><><<>>?><?<<<<<<??<><<<<>?<<?<<>>?<<>><<>>>>><<?><><<>?<<><?>>?<<<>><?<<>>>><<<<??<?<?><<?<<>>><?<<<>>?<?>><>?<<<>><?<?><<??<>?<?>>><>>?>??>><<><>><><<?<<<?<><<>><>><?>>><<<>>??<<><<>>>><>>?>>>??<>?<<>?<<>>><><<<><>><??><??>?><?<>><>?<><>??<??>><>>>>><????<<>>>?<><><<>>>>??>>><?...
output:
3999 3996
result:
ok 2 number(s): "3999 3996"
Test #34:
score: 0
Accepted
time: 54ms
memory: 3956kb
input:
50 <>><<><><<>><<>>>>><><<??>?>>><><><<><<><>?><><>?>?>?<>?><<>?>>><><<<<?<<><<<<<>>><<<<?<<<>><><><<><>><?<><><>>><>><><<<<<<??<>><<<?<<><<>><><<>><<<>><<><<>><>><<<><<>><?><>?><>><><<<<><<<>><<><<<<>>>><<?>>>?<><?<><><>><<<>><><<?<<><<>?<<<<<><><>><<>>><?<?<<><>>><<<<>?<>?<<<<<<><>>>><?<<><<<>>><<...
output:
774 768 772 768 775 773 787 765 783 759 774 782 769 769 774 765 773 779 760 770 773 778 782 764 765 772 765 787 764 771 766 763 776 765 775 775 761 776 774 780 774 772 782 768 765 778 770 757 769 777
result:
ok 50 numbers
Test #35:
score: 0
Accepted
time: 61ms
memory: 3744kb
input:
8 ><><>><>><>>>><<><<?<>?><<?>><<?<<<<><?><>>><>?<><><><?<><>>>?<<><<>>><<><<<<<><>?<><>?<>?><>>>>?>><>><><<?<<>>>><>><?<>><?><>?><<>><<<<<<><><>>><><>><<>><>?<>><?><<<<>><<<<<>><>><<<><<>>???<<<<<<<<><<>>>>?<?<>>??<>>>>><><?<<><><?<><><><>?<><<<<><>>?<><<<>>><>>><><>?<<<?<<<>>>>><<<<<<>>><<<?<>?>>>...
output:
1904 1943 1917 1950 1930 1946 1928 1919
result:
ok 8 numbers
Test #36:
score: 0
Accepted
time: 62ms
memory: 3836kb
input:
2 <>><<>><>><?><<>?<>>>><>><<??<><><?<<<>><<<>><>>>><<><<<<>>><<?><?<>><><><<><>>>><>?<><<??><?><<>>><<<>><?><<<>><?><<?<>><><<>>><<<<<><<?<<?<>>><><<><<<<><<><<??><<<>><<><<??<<>><><><?><>><<<><><<<<><><<<>><<?<<<>??<<<>??<>><<><<>>>><<<<<>><<<>><<<>>?<<<>?><<<<<<<<<?<>><>><>><<<>>><<<>><?>><<<<>><...
output:
3857 3908
result:
ok 2 number(s): "3857 3908"
Test #37:
score: 0
Accepted
time: 53ms
memory: 3664kb
input:
50 <<>>>>><<><><<><><>>>><<<<<>>><<><>><<>?<>?><><>>??<<<<?<<><>><<<>>>>>?><<<><<><>>><><>>><<<>><<<><>>><>><<>>><>><<>>><<<><<<>><<>>>><><<>>><<<<<<<>>>>?<>><<>>><>><><<<<<<><<>><><><<>><<<?<><<><?><<?<<<>?><?<<<><<><<<><<<<>><>><<<><<<<<<><><>><><><<<>>><<<<>>><>><<??><>>><>>>>><<<<><<<<><>><<<>><...
output:
761 767 753 752 755 763 744 760 770 768 763 748 767 767 764 768 764 760 753 781 757 745 761 755 768 766 767 759 755 760 756 761 752 763 755 762 749 755 757 751 758 762 765 774 757 754 745 746 753 767
result:
ok 50 numbers
Test #38:
score: 0
Accepted
time: 62ms
memory: 3740kb
input:
8 <><<<>>>>>>><<>><<<?<><<<<<<<>><><<>?<>>>>?>>>>?><><<>?>>><<>>>><<>><<><><<>><<>>>>>?><><<<<><><><><?<><<<>><><><>>><<><<><>><><><?>?<<><<<?<<<><<><>>>><<><><>><><<><>><<?>>><>><><<<<>><<>><<>><><<>>><<>><>>>><?>?>><>>>>>>>>>><><>>>>>>>>>><?>>>><?><><<>><<<<<><>>>?<><>>>>??<><><><>>?>>>><<><>>><<<...
output:
1886 1911 1902 1925 1914 1899 1901 1894
result:
ok 8 numbers
Test #39:
score: 0
Accepted
time: 60ms
memory: 3852kb
input:
2 >>><><>>>>?>>?<<>><<>><>>><<>>><<<<><<<<>>><<>><><>>>>?><?<><<>>><<?>><><><><>><<>>>>>><<<>?>>>>><>>><<<<<<<>>><<><<<><<<<<<<><<?<?>><><>><>><<<>><?<<<<>><>>><><<<>><><><><<><>>>><<<><?><><<><>>>><>>><<<><<<<><<>><>>><>><<>><<<<><<><<<>><>><>>><>><>>>>><<>>>>>><<<<<<><><>><><<<>><<>>?<><<<>?<>?>?<...
output:
3800 3812
result:
ok 2 number(s): "3800 3812"
Test #40:
score: 0
Accepted
time: 52ms
memory: 3664kb
input:
50 >>>><<>>>>>><><<<><><<><><><<<<?><>><<<>><<<<>><><><>>><><<>>>><<<<<><><><>>><><<<><<<><><<><<><<>?<>>>>>>><><<><><<><<>><><<>><>>>>><<><<<<<?>>><<><><<<>>>>>><<<><>>>>>><><<<><>><<<>><<<<<<<>>>>><<><<<<>>>>>>>><>><<<<><><>>>><>><<><<>><<<>>>><<<>><><><>><<<<<<<<<><<<>><>>>><><<><>>><><<<<><<<><>...
output:
740 765 752 746 756 750 760 747 760 747 754 743 760 744 743 735 750 750 757 753 751 759 764 740 770 762 744 739 748 756 742 732 757 745 753 754 748 761 741 766 744 769 751 779 758 751 744 749 755 747
result:
ok 50 numbers
Test #41:
score: 0
Accepted
time: 57ms
memory: 3804kb
input:
8 ><><><><<<<<>><<><>>>>><<<<>><>>><<<><<<<<>>>>>>>><<><>><><<<?<><>>><>>><>>>>>><<><><<>>><<<>>>>>>>>><<<>><>><<>><<>>><<<>><?<<>><><>>>>><><<<>><<>><><>><>>><<<><>>>>><><>><<><><><>><><<<<<<>><><><<<<>>><<>>>>>><<><><<<><<><<<<<<<<>>>>><>><><?>>>><>>>>>><><<<>><<><<><<><><><<<<<<>>><<<<><>><><><<>...
output:
1880 1856 1878 1867 1885 1907 1887 1865
result:
ok 8 numbers
Test #42:
score: 0
Accepted
time: 62ms
memory: 4144kb
input:
2 <<><<>><<><><>><?<<<>><>><>?<<<<<<>>>><><<<<<<>>><<><>><<<<<>><<>?><<<><<<><<>><<><><><>><<<<>>>>><<<<>><>>><<?><<<>>><<<>?<<><<>>>><>>><<?><><<<><><<><<>>><>><><>>><>><<>>>>><<>>><<<<<>><<<<>><<>><<>>>?><>>><<<><>>><<<>>>>><>>><<<><<<<<<<>><><<<><><><>><<<>>>><><><?>><>><>>>><>>>?><><><><<<<<<><<...
output:
3798 3782
result:
ok 2 number(s): "3798 3782"
Test #43:
score: 0
Accepted
time: 51ms
memory: 3656kb
input:
50 <><><<<<><><><<<<>><>>><>>><><>><<><<>>>><><<<><>>?>><<<><<<<>><><<<<>>>><<><<><<><<<<<>>><<>><><<<<<>>><<><><<>><<<><<<<<>><><><>><>>><><>>>>><<<>><<<><><>>>><>><>><><<<<?>><>>>>>>>>>><<<<>><>>><<>><><><<>><<<<<<>><<><<<<>>>>>>>>>><><<><><<><<<>>>>>><><><>>>>?<<><><<<>><>>?><<><><<><>>>>>>><><<>...
output:
738 748 756 747 747 749 746 744 747 753 752 751 745 744 753 741 746 747 742 745 749 745 747 742 744 747 746 748 751 755 753 755 749 749 760 748 749 748 760 743 750 743 760 737 752 745 753 759 753 755
result:
ok 50 numbers
Test #44:
score: 0
Accepted
time: 56ms
memory: 3736kb
input:
8 ><<<><<><<<<><>>><<<<>><<<><<<<<<<<>><><<<>><<<><>>>>><<>><<>><><>><><><><><<>><<><><><<<<>>><<><>>>>>>>><><<>>><>><<<<<><>><><<<><<>>>><<><<<<<<><<><<<<><>>?><<<><<<>><<>>>>>>><>><>>>><><<<><<<><>>><<><<><<>>><>>>>><<><>><<<><><<>>><<<<<<>>>>>>><<>>><<<><>>><><>>>>>><><<>>>><><<<<><<><>>?><?<>>><...
output:
1884 1875 1885 1867 1906 1876 1886 1896
result:
ok 8 numbers
Test #45:
score: 0
Accepted
time: 60ms
memory: 4148kb
input:
2 >><<<<<><<><<<>><<<<><>><><<><>>>>>>><<<<<><<><><<>>><>>>><><<<>>>>?><<>><>><><<<<<>><<<<<<><><>><<>><>><>>>>>><>><>>><<<<<>>>><<<><><<>><>>>>><<>><>>>>><>>>><><<>>><><<<<<<><<><<<><><><<<>>><><<<<><<<><<><><<>>><<<>?><>><<><<>>>><<<?>><<><<><>><><>><><><<><<><<><><<><?>>><><>>>>><>>>>>>>><><<>><<...
output:
3723 3758
result:
ok 2 number(s): "3723 3758"
Extra Test:
score: 0
Extra Test Passed