QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#821520#9066. Four Die RollsTeapot#AC ✓1ms3728kbC++141.5kb2024-12-19 16:24:352024-12-19 16:24:40

Judging History

你现在查看的是最新测评结果

  • [2024-12-19 16:24:40]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3728kb
  • [2024-12-19 16:24:35]
  • 提交

answer

/** gnu specific **/
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/** contains everything I need in std **/
#include <bits/stdc++.h>

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(S) ((int)S.size())
#define FOR(i, st_, n) for(int i = st_; i < n; ++i)
#define RFOR(i, n, end_) for(int i = (n)-1; i >= end_; --i)
#define x first
#define y second
#define pb push_back
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ull, ull> pull;
using namespace __gnu_pbds;
typedef tree<ll, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
using namespace std;
#ifdef ONPC
mt19937 rnd(228);
#else
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#endif

int32_t main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll n;
    cin >> n;
    ll a,b,c;
    if(n == 1)
    {
        cin >> a;
        cout << 5*4*3 << ' ' << 216 - 5*4*3;
    }
    else if( n == 2)
    {
        cin >> a >> b;
        if(a!= b)
            cout << 12 << ' ' << 24;
        else
            cout << 0 << ' ' << 36;
    }
    else
    {
        cin >> a >> b >> c;
        if(a == b || b == c || c == a)
            cout << 0 << ' ' << 6;
        else
            cout << 3 << ' ' << 3;
    }
}

详细

Test #1:

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

input:

2
1 2

output:

12 24

result:

ok single line: '12 24'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2
3 3

output:

0 36

result:

ok single line: '0 36'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

1
1

output:

60 156

result:

ok single line: '60 156'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

2
1 1

output:

0 36

result:

ok single line: '0 36'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
1 1 1

output:

0 6

result:

ok single line: '0 6'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
1 1 2

output:

0 6

result:

ok single line: '0 6'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
1 1 3

output:

0 6

result:

ok single line: '0 6'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
1 1 4

output:

0 6

result:

ok single line: '0 6'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

3
1 1 5

output:

0 6

result:

ok single line: '0 6'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

3
1 1 6

output:

0 6

result:

ok single line: '0 6'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
1 2 1

output:

0 6

result:

ok single line: '0 6'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
1 2 2

output:

0 6

result:

ok single line: '0 6'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
1 2 3

output:

3 3

result:

ok single line: '3 3'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

3
1 2 4

output:

3 3

result:

ok single line: '3 3'

Test #15:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
1 2 5

output:

3 3

result:

ok single line: '3 3'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

3
1 2 6

output:

3 3

result:

ok single line: '3 3'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

2
1 3

output:

12 24

result:

ok single line: '12 24'

Test #18:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
1 3 1

output:

0 6

result:

ok single line: '0 6'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

3
1 3 2

output:

3 3

result:

ok single line: '3 3'

Test #20:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

3
1 3 3

output:

0 6

result:

ok single line: '0 6'

Test #21:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
1 3 4

output:

3 3

result:

ok single line: '3 3'

Test #22:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
1 3 5

output:

3 3

result:

ok single line: '3 3'

Test #23:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

3
1 3 6

output:

3 3

result:

ok single line: '3 3'

Test #24:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

2
1 4

output:

12 24

result:

ok single line: '12 24'

Test #25:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

3
1 4 1

output:

0 6

result:

ok single line: '0 6'

Test #26:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
1 4 2

output:

3 3

result:

ok single line: '3 3'

Test #27:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
1 4 3

output:

3 3

result:

ok single line: '3 3'

Test #28:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
1 4 4

output:

0 6

result:

ok single line: '0 6'

Test #29:

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

input:

3
1 4 5

output:

3 3

result:

ok single line: '3 3'

Test #30:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

3
1 4 6

output:

3 3

result:

ok single line: '3 3'

Test #31:

score: 0
Accepted
time: 0ms
memory: 3728kb

input:

2
1 5

output:

12 24

result:

ok single line: '12 24'

Test #32:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

3
1 5 1

output:

0 6

result:

ok single line: '0 6'

Test #33:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
1 5 2

output:

3 3

result:

ok single line: '3 3'

Test #34:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
1 5 3

output:

3 3

result:

ok single line: '3 3'

Test #35:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
1 5 4

output:

3 3

result:

ok single line: '3 3'

Test #36:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

3
1 5 5

output:

0 6

result:

ok single line: '0 6'

Test #37:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
1 5 6

output:

3 3

result:

ok single line: '3 3'

Test #38:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

2
1 6

output:

12 24

result:

ok single line: '12 24'

Test #39:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

3
1 6 1

output:

0 6

result:

ok single line: '0 6'

Test #40:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

3
1 6 2

output:

3 3

result:

ok single line: '3 3'

Test #41:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

3
1 6 3

output:

3 3

result:

ok single line: '3 3'

Test #42:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

3
1 6 4

output:

3 3

result:

ok single line: '3 3'

Test #43:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

3
1 6 5

output:

3 3

result:

ok single line: '3 3'

Test #44:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

3
1 6 6

output:

0 6

result:

ok single line: '0 6'

Test #45:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

1
2

output:

60 156

result:

ok single line: '60 156'

Test #46:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

2
2 1

output:

12 24

result:

ok single line: '12 24'

Test #47:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

3
2 1 1

output:

0 6

result:

ok single line: '0 6'

Test #48:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
2 1 2

output:

0 6

result:

ok single line: '0 6'

Test #49:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

3
2 1 3

output:

3 3

result:

ok single line: '3 3'

Test #50:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
2 1 4

output:

3 3

result:

ok single line: '3 3'

Test #51:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
2 1 5

output:

3 3

result:

ok single line: '3 3'

Test #52:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
2 1 6

output:

3 3

result:

ok single line: '3 3'

Test #53:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

2
2 2

output:

0 36

result:

ok single line: '0 36'

Test #54:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

3
2 2 1

output:

0 6

result:

ok single line: '0 6'

Test #55:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
2 2 2

output:

0 6

result:

ok single line: '0 6'

Test #56:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
2 2 3

output:

0 6

result:

ok single line: '0 6'

Test #57:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
2 2 4

output:

0 6

result:

ok single line: '0 6'

Test #58:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
2 2 5

output:

0 6

result:

ok single line: '0 6'

Test #59:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
2 2 6

output:

0 6

result:

ok single line: '0 6'

Test #60:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2
2 3

output:

12 24

result:

ok single line: '12 24'

Test #61:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
2 3 1

output:

3 3

result:

ok single line: '3 3'

Test #62:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

3
2 3 2

output:

0 6

result:

ok single line: '0 6'

Test #63:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

3
2 3 3

output:

0 6

result:

ok single line: '0 6'

Test #64:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
2 3 4

output:

3 3

result:

ok single line: '3 3'

Test #65:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

3
2 3 5

output:

3 3

result:

ok single line: '3 3'

Test #66:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
2 3 6

output:

3 3

result:

ok single line: '3 3'

Test #67:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

2
2 4

output:

12 24

result:

ok single line: '12 24'

Test #68:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
2 4 1

output:

3 3

result:

ok single line: '3 3'

Test #69:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

3
2 4 2

output:

0 6

result:

ok single line: '0 6'

Test #70:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

3
2 4 3

output:

3 3

result:

ok single line: '3 3'

Test #71:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
2 4 4

output:

0 6

result:

ok single line: '0 6'

Test #72:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
2 4 5

output:

3 3

result:

ok single line: '3 3'

Test #73:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
2 4 6

output:

3 3

result:

ok single line: '3 3'

Test #74:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2
2 5

output:

12 24

result:

ok single line: '12 24'

Test #75:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
2 5 1

output:

3 3

result:

ok single line: '3 3'

Test #76:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
2 5 2

output:

0 6

result:

ok single line: '0 6'

Test #77:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

3
2 5 3

output:

3 3

result:

ok single line: '3 3'

Test #78:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
2 5 4

output:

3 3

result:

ok single line: '3 3'

Test #79:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
2 5 5

output:

0 6

result:

ok single line: '0 6'

Test #80:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

3
2 5 6

output:

3 3

result:

ok single line: '3 3'

Test #81:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

2
2 6

output:

12 24

result:

ok single line: '12 24'

Test #82:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
2 6 1

output:

3 3

result:

ok single line: '3 3'

Test #83:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

3
2 6 2

output:

0 6

result:

ok single line: '0 6'

Test #84:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

3
2 6 3

output:

3 3

result:

ok single line: '3 3'

Test #85:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
2 6 4

output:

3 3

result:

ok single line: '3 3'

Test #86:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
2 6 5

output:

3 3

result:

ok single line: '3 3'

Test #87:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
2 6 6

output:

0 6

result:

ok single line: '0 6'

Test #88:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

1
3

output:

60 156

result:

ok single line: '60 156'

Test #89:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

2
3 1

output:

12 24

result:

ok single line: '12 24'

Test #90:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

3
3 1 1

output:

0 6

result:

ok single line: '0 6'

Test #91:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
3 1 2

output:

3 3

result:

ok single line: '3 3'

Test #92:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

3
3 1 3

output:

0 6

result:

ok single line: '0 6'

Test #93:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
3 1 4

output:

3 3

result:

ok single line: '3 3'

Test #94:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
3 1 5

output:

3 3

result:

ok single line: '3 3'

Test #95:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
3 1 6

output:

3 3

result:

ok single line: '3 3'

Test #96:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

2
3 2

output:

12 24

result:

ok single line: '12 24'

Test #97:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

3
3 2 1

output:

3 3

result:

ok single line: '3 3'

Test #98:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
3 2 2

output:

0 6

result:

ok single line: '0 6'

Test #99:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
3 2 3

output:

0 6

result:

ok single line: '0 6'

Test #100:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
3 2 4

output:

3 3

result:

ok single line: '3 3'

Test #101:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
3 2 5

output:

3 3

result:

ok single line: '3 3'

Test #102:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
3 2 6

output:

3 3

result:

ok single line: '3 3'

Test #103:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

3
3 3 1

output:

0 6

result:

ok single line: '0 6'

Test #104:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
3 3 2

output:

0 6

result:

ok single line: '0 6'

Test #105:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

3
3 3 3

output:

0 6

result:

ok single line: '0 6'

Test #106:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

3
3 3 4

output:

0 6

result:

ok single line: '0 6'

Test #107:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

3
3 3 5

output:

0 6

result:

ok single line: '0 6'

Test #108:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
3 3 6

output:

0 6

result:

ok single line: '0 6'

Test #109:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

2
3 4

output:

12 24

result:

ok single line: '12 24'

Test #110:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
3 4 1

output:

3 3

result:

ok single line: '3 3'

Test #111:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
3 4 2

output:

3 3

result:

ok single line: '3 3'

Test #112:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

3
3 4 3

output:

0 6

result:

ok single line: '0 6'

Test #113:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
3 4 4

output:

0 6

result:

ok single line: '0 6'

Test #114:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
3 4 5

output:

3 3

result:

ok single line: '3 3'

Test #115:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

3
3 4 6

output:

3 3

result:

ok single line: '3 3'

Test #116:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2
3 5

output:

12 24

result:

ok single line: '12 24'

Test #117:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
3 5 1

output:

3 3

result:

ok single line: '3 3'

Test #118:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
3 5 2

output:

3 3

result:

ok single line: '3 3'

Test #119:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
3 5 3

output:

0 6

result:

ok single line: '0 6'

Test #120:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

3
3 5 4

output:

3 3

result:

ok single line: '3 3'

Test #121:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

3
3 5 5

output:

0 6

result:

ok single line: '0 6'

Test #122:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

3
3 5 6

output:

3 3

result:

ok single line: '3 3'

Test #123:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

2
3 6

output:

12 24

result:

ok single line: '12 24'

Test #124:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

3
3 6 1

output:

3 3

result:

ok single line: '3 3'

Test #125:

score: 0
Accepted
time: 1ms
memory: 3496kb

input:

3
3 6 2

output:

3 3

result:

ok single line: '3 3'

Test #126:

score: 0
Accepted
time: 1ms
memory: 3588kb

input:

3
3 6 3

output:

0 6

result:

ok single line: '0 6'

Test #127:

score: 0
Accepted
time: 1ms
memory: 3592kb

input:

3
3 6 4

output:

3 3

result:

ok single line: '3 3'

Test #128:

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

input:

3
3 6 5

output:

3 3

result:

ok single line: '3 3'

Test #129:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
3 6 6

output:

0 6

result:

ok single line: '0 6'

Test #130:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

1
4

output:

60 156

result:

ok single line: '60 156'

Test #131:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

2
4 1

output:

12 24

result:

ok single line: '12 24'

Test #132:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

3
4 1 1

output:

0 6

result:

ok single line: '0 6'

Test #133:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
4 1 2

output:

3 3

result:

ok single line: '3 3'

Test #134:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

3
4 1 3

output:

3 3

result:

ok single line: '3 3'

Test #135:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
4 1 4

output:

0 6

result:

ok single line: '0 6'

Test #136:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

3
4 1 5

output:

3 3

result:

ok single line: '3 3'

Test #137:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
4 1 6

output:

3 3

result:

ok single line: '3 3'

Test #138:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

2
4 2

output:

12 24

result:

ok single line: '12 24'

Test #139:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

3
4 2 1

output:

3 3

result:

ok single line: '3 3'

Test #140:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

3
4 2 2

output:

0 6

result:

ok single line: '0 6'

Test #141:

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

input:

3
4 2 3

output:

3 3

result:

ok single line: '3 3'

Test #142:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
4 2 4

output:

0 6

result:

ok single line: '0 6'

Test #143:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

3
4 2 5

output:

3 3

result:

ok single line: '3 3'

Test #144:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
4 2 6

output:

3 3

result:

ok single line: '3 3'

Test #145:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

2
4 3

output:

12 24

result:

ok single line: '12 24'

Test #146:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
4 3 1

output:

3 3

result:

ok single line: '3 3'

Test #147:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
4 3 2

output:

3 3

result:

ok single line: '3 3'

Test #148:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
4 3 3

output:

0 6

result:

ok single line: '0 6'

Test #149:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

3
4 3 4

output:

0 6

result:

ok single line: '0 6'

Test #150:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
4 3 5

output:

3 3

result:

ok single line: '3 3'

Test #151:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

3
4 3 6

output:

3 3

result:

ok single line: '3 3'

Test #152:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2
4 4

output:

0 36

result:

ok single line: '0 36'

Test #153:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
4 4 1

output:

0 6

result:

ok single line: '0 6'

Test #154:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

3
4 4 2

output:

0 6

result:

ok single line: '0 6'

Test #155:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

3
4 4 3

output:

0 6

result:

ok single line: '0 6'

Test #156:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
4 4 4

output:

0 6

result:

ok single line: '0 6'

Test #157:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
4 4 5

output:

0 6

result:

ok single line: '0 6'

Test #158:

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

input:

3
4 4 6

output:

0 6

result:

ok single line: '0 6'

Test #159:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

2
4 5

output:

12 24

result:

ok single line: '12 24'

Test #160:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
4 5 1

output:

3 3

result:

ok single line: '3 3'

Test #161:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

3
4 5 2

output:

3 3

result:

ok single line: '3 3'

Test #162:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

3
4 5 3

output:

3 3

result:

ok single line: '3 3'

Test #163:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

3
4 5 4

output:

0 6

result:

ok single line: '0 6'

Test #164:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
4 5 5

output:

0 6

result:

ok single line: '0 6'

Test #165:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

3
4 5 6

output:

3 3

result:

ok single line: '3 3'

Test #166:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2
4 6

output:

12 24

result:

ok single line: '12 24'

Test #167:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
4 6 1

output:

3 3

result:

ok single line: '3 3'

Test #168:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

3
4 6 2

output:

3 3

result:

ok single line: '3 3'

Test #169:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

3
4 6 3

output:

3 3

result:

ok single line: '3 3'

Test #170:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
4 6 4

output:

0 6

result:

ok single line: '0 6'

Test #171:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
4 6 5

output:

3 3

result:

ok single line: '3 3'

Test #172:

score: 0
Accepted
time: 0ms
memory: 3492kb

input:

3
4 6 6

output:

0 6

result:

ok single line: '0 6'

Test #173:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

1
5

output:

60 156

result:

ok single line: '60 156'

Test #174:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

2
5 1

output:

12 24

result:

ok single line: '12 24'

Test #175:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
5 1 1

output:

0 6

result:

ok single line: '0 6'

Test #176:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
5 1 2

output:

3 3

result:

ok single line: '3 3'

Test #177:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

3
5 1 3

output:

3 3

result:

ok single line: '3 3'

Test #178:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
5 1 4

output:

3 3

result:

ok single line: '3 3'

Test #179:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
5 1 5

output:

0 6

result:

ok single line: '0 6'

Test #180:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

3
5 1 6

output:

3 3

result:

ok single line: '3 3'

Test #181:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

2
5 2

output:

12 24

result:

ok single line: '12 24'

Test #182:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
5 2 1

output:

3 3

result:

ok single line: '3 3'

Test #183:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

3
5 2 2

output:

0 6

result:

ok single line: '0 6'

Test #184:

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

input:

3
5 2 3

output:

3 3

result:

ok single line: '3 3'

Test #185:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

3
5 2 4

output:

3 3

result:

ok single line: '3 3'

Test #186:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

3
5 2 5

output:

0 6

result:

ok single line: '0 6'

Test #187:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

3
5 2 6

output:

3 3

result:

ok single line: '3 3'

Test #188:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

2
5 3

output:

12 24

result:

ok single line: '12 24'

Test #189:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

3
5 3 1

output:

3 3

result:

ok single line: '3 3'

Test #190:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
5 3 2

output:

3 3

result:

ok single line: '3 3'

Test #191:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

3
5 3 3

output:

0 6

result:

ok single line: '0 6'

Test #192:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
5 3 4

output:

3 3

result:

ok single line: '3 3'

Test #193:

score: 0
Accepted
time: 0ms
memory: 3492kb

input:

3
5 3 5

output:

0 6

result:

ok single line: '0 6'

Test #194:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

3
5 3 6

output:

3 3

result:

ok single line: '3 3'

Test #195:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2
5 4

output:

12 24

result:

ok single line: '12 24'

Test #196:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

3
5 4 1

output:

3 3

result:

ok single line: '3 3'

Test #197:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
5 4 2

output:

3 3

result:

ok single line: '3 3'

Test #198:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
5 4 3

output:

3 3

result:

ok single line: '3 3'

Test #199:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

3
5 4 4

output:

0 6

result:

ok single line: '0 6'

Test #200:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

3
5 4 5

output:

0 6

result:

ok single line: '0 6'

Test #201:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

3
5 4 6

output:

3 3

result:

ok single line: '3 3'

Test #202:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

2
5 5

output:

0 36

result:

ok single line: '0 36'

Test #203:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

3
5 5 1

output:

0 6

result:

ok single line: '0 6'

Test #204:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
5 5 2

output:

0 6

result:

ok single line: '0 6'

Test #205:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
5 5 3

output:

0 6

result:

ok single line: '0 6'

Test #206:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
5 5 4

output:

0 6

result:

ok single line: '0 6'

Test #207:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

3
5 5 5

output:

0 6

result:

ok single line: '0 6'

Test #208:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
5 5 6

output:

0 6

result:

ok single line: '0 6'

Test #209:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

2
5 6

output:

12 24

result:

ok single line: '12 24'

Test #210:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

3
5 6 1

output:

3 3

result:

ok single line: '3 3'

Test #211:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
5 6 2

output:

3 3

result:

ok single line: '3 3'

Test #212:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

3
5 6 3

output:

3 3

result:

ok single line: '3 3'

Test #213:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
5 6 4

output:

3 3

result:

ok single line: '3 3'

Test #214:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
5 6 5

output:

0 6

result:

ok single line: '0 6'

Test #215:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
5 6 6

output:

0 6

result:

ok single line: '0 6'

Test #216:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

1
6

output:

60 156

result:

ok single line: '60 156'

Test #217:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

2
6 1

output:

12 24

result:

ok single line: '12 24'

Test #218:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
6 1 1

output:

0 6

result:

ok single line: '0 6'

Test #219:

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

input:

3
6 1 2

output:

3 3

result:

ok single line: '3 3'

Test #220:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
6 1 3

output:

3 3

result:

ok single line: '3 3'

Test #221:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
6 1 4

output:

3 3

result:

ok single line: '3 3'

Test #222:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
6 1 5

output:

3 3

result:

ok single line: '3 3'

Test #223:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

3
6 1 6

output:

0 6

result:

ok single line: '0 6'

Test #224:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

2
6 2

output:

12 24

result:

ok single line: '12 24'

Test #225:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
6 2 1

output:

3 3

result:

ok single line: '3 3'

Test #226:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
6 2 2

output:

0 6

result:

ok single line: '0 6'

Test #227:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
6 2 3

output:

3 3

result:

ok single line: '3 3'

Test #228:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
6 2 4

output:

3 3

result:

ok single line: '3 3'

Test #229:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

3
6 2 5

output:

3 3

result:

ok single line: '3 3'

Test #230:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

3
6 2 6

output:

0 6

result:

ok single line: '0 6'

Test #231:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

2
6 3

output:

12 24

result:

ok single line: '12 24'

Test #232:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

3
6 3 1

output:

3 3

result:

ok single line: '3 3'

Test #233:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

3
6 3 2

output:

3 3

result:

ok single line: '3 3'

Test #234:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

3
6 3 3

output:

0 6

result:

ok single line: '0 6'

Test #235:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
6 3 4

output:

3 3

result:

ok single line: '3 3'

Test #236:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

3
6 3 5

output:

3 3

result:

ok single line: '3 3'

Test #237:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

3
6 3 6

output:

0 6

result:

ok single line: '0 6'

Test #238:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

2
6 4

output:

12 24

result:

ok single line: '12 24'

Test #239:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

3
6 4 1

output:

3 3

result:

ok single line: '3 3'

Test #240:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
6 4 2

output:

3 3

result:

ok single line: '3 3'

Test #241:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
6 4 3

output:

3 3

result:

ok single line: '3 3'

Test #242:

score: 0
Accepted
time: 0ms
memory: 3728kb

input:

3
6 4 4

output:

0 6

result:

ok single line: '0 6'

Test #243:

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

input:

3
6 4 5

output:

3 3

result:

ok single line: '3 3'

Test #244:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

3
6 4 6

output:

0 6

result:

ok single line: '0 6'

Test #245:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

2
6 5

output:

12 24

result:

ok single line: '12 24'

Test #246:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

3
6 5 1

output:

3 3

result:

ok single line: '3 3'

Test #247:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

3
6 5 2

output:

3 3

result:

ok single line: '3 3'

Test #248:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

3
6 5 3

output:

3 3

result:

ok single line: '3 3'

Test #249:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
6 5 4

output:

3 3

result:

ok single line: '3 3'

Test #250:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
6 5 5

output:

0 6

result:

ok single line: '0 6'

Test #251:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3
6 5 6

output:

0 6

result:

ok single line: '0 6'

Test #252:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

2
6 6

output:

0 36

result:

ok single line: '0 36'

Test #253:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

3
6 6 1

output:

0 6

result:

ok single line: '0 6'

Test #254:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
6 6 2

output:

0 6

result:

ok single line: '0 6'

Test #255:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

3
6 6 3

output:

0 6

result:

ok single line: '0 6'

Test #256:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

3
6 6 4

output:

0 6

result:

ok single line: '0 6'

Test #257:

score: 0
Accepted
time: 0ms
memory: 3728kb

input:

3
6 6 5

output:

0 6

result:

ok single line: '0 6'

Test #258:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

3
6 6 6

output:

0 6

result:

ok single line: '0 6'