# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1117449 | trinhvtuan | Miners (IOI07_miners) | C++17 | 344 ms | 844 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int c,d,x,y,z,n,kq;
int i,j,k;
typedef pair<int,int>i2;
string s;
int a[200005],dp[3][4][4][4][4];
int main()
{
// freopen("MINERS.INP", "r" ,stdin);
// freopen("MINERS.OUT", "w" ,stdout);
// freopen("tongab.inp", "r" ,stdin);
// freopen("tongab.txt", "w" ,stdout);
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin>>n;
cin>>s; s='0'+s;
for (int i=1;i<=n;i++)
if (s[i]=='M') a[i]=1; else
if (s[i]=='B') a[i]=2; else a[i]=3;
for (int rep=1;rep<=n;rep++)
{
x=1; y=0;
if (rep>1) k=1; else k=0;
for (int x1=0;x1<=3;x1++)
for (int x2=0;x2<=3;x2++)
for (int y1=0;y1<=3;y1++)
for (int y2=0;y2<=3;y2++)
{
if (dp[y][x1][x2][y1][y2]==0 && rep>1) continue;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |