QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#821534#9066. Four Die RollsWeaRD276#AC ✓1ms3820kbC++201.7kb2024-12-19 16:29:482024-12-19 16:29:48

Judging History

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

  • [2024-12-19 16:29:48]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3820kb
  • [2024-12-19 16:29:48]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define x first
#define y second
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)

typedef long long ll;
typedef double db;
typedef long double LD;
typedef pair<int, int> pii;
typedef pair<db, db> pdd;
typedef pair<ll, ll> pll;


int solve()
{
	int n;
	if (!(cin >> n))
		return 1;
	
	vector<int> a(n);
	FOR (i, 0, n)
		cin >> a[i];
	
	int ans1 = 0, ans2 = 0;
	if (n == 1)
	{
		FOR (i, 1, 7)
		{
			FOR (j, 1, 7)
			{
				FOR (k, 1, 7)
				{
					vector<int> curr = a;
					curr.pb(i);
					curr.pb(j);
					curr.pb(k);
					set<int> s(all(curr));
					if (sz(s) == 4)
						ans1++;
					else
						ans2++;
				}
			}
		}
	}
	else if (n == 2)
	{
		FOR (i, 1, 7)
		{
			FOR (j, 1, 7)
			{		
				vector<int> curr = a;
				curr.pb(i);
				curr.pb(j);
				set<int> s(all(curr));
				if (sz(s) == 4)
					ans1++;
				else
					ans2++;				
			}
		}
	}
	else
	{
		FOR (i, 1, 7)
		{
			vector<int> curr = a;
			curr.pb(i);
			set<int> s(all(curr));
			if (sz(s) == 4)
				ans1++;
			else
				ans2++;	
		}
	}
	cout << ans1 << ' ' << ans2 << '\n';
	
	return 0;
}

int32_t main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int TET = 1e9;
	//cin >> TET;
	for (int i = 1; i <= TET; i++)
	{
		if (solve())
		{
			break;
		}
		#ifdef ONPC
			cerr << "_____________________________\n";
		#endif
	}
	#ifdef ONPC
		cerr << "\nfinished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec\n";
	#endif
	return 0;
}

详细

Test #1:

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

input:

2
1 2

output:

12 24

result:

ok single line: '12 24'

Test #2:

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

input:

2
3 3

output:

0 36

result:

ok single line: '0 36'

Test #3:

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

input:

1
1

output:

60 156

result:

ok single line: '60 156'

Test #4:

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

input:

2
1 1

output:

0 36

result:

ok single line: '0 36'

Test #5:

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

input:

3
1 1 1

output:

0 6

result:

ok single line: '0 6'

Test #6:

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

input:

3
1 1 2

output:

0 6

result:

ok single line: '0 6'

Test #7:

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

input:

3
1 1 3

output:

0 6

result:

ok single line: '0 6'

Test #8:

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

input:

3
1 1 4

output:

0 6

result:

ok single line: '0 6'

Test #9:

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

input:

3
1 1 5

output:

0 6

result:

ok single line: '0 6'

Test #10:

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

input:

3
1 1 6

output:

0 6

result:

ok single line: '0 6'

Test #11:

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

input:

3
1 2 1

output:

0 6

result:

ok single line: '0 6'

Test #12:

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

input:

3
1 2 2

output:

0 6

result:

ok single line: '0 6'

Test #13:

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

input:

3
1 2 3

output:

3 3

result:

ok single line: '3 3'

Test #14:

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

input:

3
1 2 4

output:

3 3

result:

ok single line: '3 3'

Test #15:

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

input:

3
1 2 5

output:

3 3

result:

ok single line: '3 3'

Test #16:

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

input:

3
1 2 6

output:

3 3

result:

ok single line: '3 3'

Test #17:

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

input:

2
1 3

output:

12 24

result:

ok single line: '12 24'

Test #18:

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

input:

3
1 3 1

output:

0 6

result:

ok single line: '0 6'

Test #19:

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

input:

3
1 3 2

output:

3 3

result:

ok single line: '3 3'

Test #20:

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

input:

3
1 3 3

output:

0 6

result:

ok single line: '0 6'

Test #21:

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

input:

3
1 3 4

output:

3 3

result:

ok single line: '3 3'

Test #22:

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

input:

3
1 3 5

output:

3 3

result:

ok single line: '3 3'

Test #23:

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

input:

3
1 3 6

output:

3 3

result:

ok single line: '3 3'

Test #24:

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

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: 3528kb

input:

3
1 4 2

output:

3 3

result:

ok single line: '3 3'

Test #27:

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

input:

3
1 4 3

output:

3 3

result:

ok single line: '3 3'

Test #28:

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

input:

3
1 4 4

output:

0 6

result:

ok single line: '0 6'

Test #29:

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

input:

3
1 4 5

output:

3 3

result:

ok single line: '3 3'

Test #30:

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

input:

3
1 4 6

output:

3 3

result:

ok single line: '3 3'

Test #31:

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

input:

2
1 5

output:

12 24

result:

ok single line: '12 24'

Test #32:

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

input:

3
1 5 1

output:

0 6

result:

ok single line: '0 6'

Test #33:

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

input:

3
1 5 2

output:

3 3

result:

ok single line: '3 3'

Test #34:

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

input:

3
1 5 3

output:

3 3

result:

ok single line: '3 3'

Test #35:

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

input:

3
1 5 4

output:

3 3

result:

ok single line: '3 3'

Test #36:

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

input:

3
1 5 5

output:

0 6

result:

ok single line: '0 6'

Test #37:

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

input:

3
1 5 6

output:

3 3

result:

ok single line: '3 3'

Test #38:

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

input:

2
1 6

output:

12 24

result:

ok single line: '12 24'

Test #39:

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

input:

3
1 6 1

output:

0 6

result:

ok single line: '0 6'

Test #40:

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

input:

3
1 6 2

output:

3 3

result:

ok single line: '3 3'

Test #41:

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

input:

3
1 6 3

output:

3 3

result:

ok single line: '3 3'

Test #42:

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

input:

3
1 6 4

output:

3 3

result:

ok single line: '3 3'

Test #43:

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

input:

3
1 6 5

output:

3 3

result:

ok single line: '3 3'

Test #44:

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

input:

3
1 6 6

output:

0 6

result:

ok single line: '0 6'

Test #45:

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

input:

1
2

output:

60 156

result:

ok single line: '60 156'

Test #46:

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

input:

2
2 1

output:

12 24

result:

ok single line: '12 24'

Test #47:

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

input:

3
2 1 1

output:

0 6

result:

ok single line: '0 6'

Test #48:

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

input:

3
2 1 2

output:

0 6

result:

ok single line: '0 6'

Test #49:

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

input:

3
2 1 3

output:

3 3

result:

ok single line: '3 3'

Test #50:

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

input:

3
2 1 4

output:

3 3

result:

ok single line: '3 3'

Test #51:

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

input:

3
2 1 5

output:

3 3

result:

ok single line: '3 3'

Test #52:

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

input:

3
2 1 6

output:

3 3

result:

ok single line: '3 3'

Test #53:

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

input:

2
2 2

output:

0 36

result:

ok single line: '0 36'

Test #54:

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

input:

3
2 2 1

output:

0 6

result:

ok single line: '0 6'

Test #55:

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

input:

3
2 2 2

output:

0 6

result:

ok single line: '0 6'

Test #56:

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

input:

3
2 2 3

output:

0 6

result:

ok single line: '0 6'

Test #57:

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

input:

3
2 2 4

output:

0 6

result:

ok single line: '0 6'

Test #58:

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

input:

3
2 2 5

output:

0 6

result:

ok single line: '0 6'

Test #59:

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

input:

3
2 2 6

output:

0 6

result:

ok single line: '0 6'

Test #60:

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

input:

2
2 3

output:

12 24

result:

ok single line: '12 24'

Test #61:

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

input:

3
2 3 1

output:

3 3

result:

ok single line: '3 3'

Test #62:

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

input:

3
2 3 2

output:

0 6

result:

ok single line: '0 6'

Test #63:

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

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: 3516kb

input:

3
2 3 5

output:

3 3

result:

ok single line: '3 3'

Test #66:

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

input:

3
2 3 6

output:

3 3

result:

ok single line: '3 3'

Test #67:

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

input:

2
2 4

output:

12 24

result:

ok single line: '12 24'

Test #68:

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

input:

3
2 4 1

output:

3 3

result:

ok single line: '3 3'

Test #69:

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

input:

3
2 4 2

output:

0 6

result:

ok single line: '0 6'

Test #70:

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

input:

3
2 4 3

output:

3 3

result:

ok single line: '3 3'

Test #71:

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

input:

3
2 4 4

output:

0 6

result:

ok single line: '0 6'

Test #72:

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

input:

3
2 4 5

output:

3 3

result:

ok single line: '3 3'

Test #73:

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

input:

3
2 4 6

output:

3 3

result:

ok single line: '3 3'

Test #74:

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

input:

2
2 5

output:

12 24

result:

ok single line: '12 24'

Test #75:

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

input:

3
2 5 1

output:

3 3

result:

ok single line: '3 3'

Test #76:

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

input:

3
2 5 2

output:

0 6

result:

ok single line: '0 6'

Test #77:

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

input:

3
2 5 3

output:

3 3

result:

ok single line: '3 3'

Test #78:

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

input:

3
2 5 4

output:

3 3

result:

ok single line: '3 3'

Test #79:

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

input:

3
2 5 5

output:

0 6

result:

ok single line: '0 6'

Test #80:

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

input:

3
2 5 6

output:

3 3

result:

ok single line: '3 3'

Test #81:

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

input:

2
2 6

output:

12 24

result:

ok single line: '12 24'

Test #82:

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

input:

3
2 6 1

output:

3 3

result:

ok single line: '3 3'

Test #83:

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

input:

3
2 6 2

output:

0 6

result:

ok single line: '0 6'

Test #84:

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

input:

3
2 6 3

output:

3 3

result:

ok single line: '3 3'

Test #85:

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

input:

3
2 6 4

output:

3 3

result:

ok single line: '3 3'

Test #86:

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

input:

3
2 6 5

output:

3 3

result:

ok single line: '3 3'

Test #87:

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

input:

3
2 6 6

output:

0 6

result:

ok single line: '0 6'

Test #88:

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

input:

1
3

output:

60 156

result:

ok single line: '60 156'

Test #89:

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

input:

2
3 1

output:

12 24

result:

ok single line: '12 24'

Test #90:

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

input:

3
3 1 1

output:

0 6

result:

ok single line: '0 6'

Test #91:

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

input:

3
3 1 2

output:

3 3

result:

ok single line: '3 3'

Test #92:

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

input:

3
3 1 3

output:

0 6

result:

ok single line: '0 6'

Test #93:

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

input:

3
3 1 4

output:

3 3

result:

ok single line: '3 3'

Test #94:

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

input:

3
3 1 5

output:

3 3

result:

ok single line: '3 3'

Test #95:

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

input:

3
3 1 6

output:

3 3

result:

ok single line: '3 3'

Test #96:

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

input:

2
3 2

output:

12 24

result:

ok single line: '12 24'

Test #97:

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

input:

3
3 2 1

output:

3 3

result:

ok single line: '3 3'

Test #98:

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

input:

3
3 2 2

output:

0 6

result:

ok single line: '0 6'

Test #99:

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

input:

3
3 2 3

output:

0 6

result:

ok single line: '0 6'

Test #100:

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

input:

3
3 2 4

output:

3 3

result:

ok single line: '3 3'

Test #101:

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

input:

3
3 2 5

output:

3 3

result:

ok single line: '3 3'

Test #102:

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

input:

3
3 2 6

output:

3 3

result:

ok single line: '3 3'

Test #103:

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

input:

3
3 3 1

output:

0 6

result:

ok single line: '0 6'

Test #104:

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

input:

3
3 3 2

output:

0 6

result:

ok single line: '0 6'

Test #105:

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

input:

3
3 3 3

output:

0 6

result:

ok single line: '0 6'

Test #106:

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

input:

3
3 3 4

output:

0 6

result:

ok single line: '0 6'

Test #107:

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

input:

3
3 3 5

output:

0 6

result:

ok single line: '0 6'

Test #108:

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

input:

3
3 3 6

output:

0 6

result:

ok single line: '0 6'

Test #109:

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

input:

2
3 4

output:

12 24

result:

ok single line: '12 24'

Test #110:

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

input:

3
3 4 1

output:

3 3

result:

ok single line: '3 3'

Test #111:

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

input:

3
3 4 2

output:

3 3

result:

ok single line: '3 3'

Test #112:

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

input:

3
3 4 3

output:

0 6

result:

ok single line: '0 6'

Test #113:

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

input:

3
3 4 4

output:

0 6

result:

ok single line: '0 6'

Test #114:

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

input:

3
3 4 5

output:

3 3

result:

ok single line: '3 3'

Test #115:

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

input:

3
3 4 6

output:

3 3

result:

ok single line: '3 3'

Test #116:

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

input:

2
3 5

output:

12 24

result:

ok single line: '12 24'

Test #117:

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

input:

3
3 5 1

output:

3 3

result:

ok single line: '3 3'

Test #118:

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

input:

3
3 5 2

output:

3 3

result:

ok single line: '3 3'

Test #119:

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

input:

3
3 5 3

output:

0 6

result:

ok single line: '0 6'

Test #120:

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

input:

3
3 5 4

output:

3 3

result:

ok single line: '3 3'

Test #121:

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

input:

3
3 5 5

output:

0 6

result:

ok single line: '0 6'

Test #122:

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

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: 0ms
memory: 3612kb

input:

3
3 6 1

output:

3 3

result:

ok single line: '3 3'

Test #125:

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

input:

3
3 6 2

output:

3 3

result:

ok single line: '3 3'

Test #126:

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

input:

3
3 6 3

output:

0 6

result:

ok single line: '0 6'

Test #127:

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

input:

3
3 6 4

output:

3 3

result:

ok single line: '3 3'

Test #128:

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

input:

3
3 6 5

output:

3 3

result:

ok single line: '3 3'

Test #129:

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

input:

3
3 6 6

output:

0 6

result:

ok single line: '0 6'

Test #130:

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

input:

1
4

output:

60 156

result:

ok single line: '60 156'

Test #131:

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

input:

2
4 1

output:

12 24

result:

ok single line: '12 24'

Test #132:

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

input:

3
4 1 1

output:

0 6

result:

ok single line: '0 6'

Test #133:

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

input:

3
4 1 2

output:

3 3

result:

ok single line: '3 3'

Test #134:

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

input:

3
4 1 3

output:

3 3

result:

ok single line: '3 3'

Test #135:

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

input:

3
4 1 4

output:

0 6

result:

ok single line: '0 6'

Test #136:

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

input:

3
4 1 5

output:

3 3

result:

ok single line: '3 3'

Test #137:

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

input:

3
4 1 6

output:

3 3

result:

ok single line: '3 3'

Test #138:

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

input:

2
4 2

output:

12 24

result:

ok single line: '12 24'

Test #139:

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

input:

3
4 2 1

output:

3 3

result:

ok single line: '3 3'

Test #140:

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

input:

3
4 2 2

output:

0 6

result:

ok single line: '0 6'

Test #141:

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

input:

3
4 2 3

output:

3 3

result:

ok single line: '3 3'

Test #142:

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

input:

3
4 2 4

output:

0 6

result:

ok single line: '0 6'

Test #143:

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

input:

3
4 2 5

output:

3 3

result:

ok single line: '3 3'

Test #144:

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

input:

3
4 2 6

output:

3 3

result:

ok single line: '3 3'

Test #145:

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

input:

2
4 3

output:

12 24

result:

ok single line: '12 24'

Test #146:

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

input:

3
4 3 1

output:

3 3

result:

ok single line: '3 3'

Test #147:

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

input:

3
4 3 2

output:

3 3

result:

ok single line: '3 3'

Test #148:

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

input:

3
4 3 3

output:

0 6

result:

ok single line: '0 6'

Test #149:

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

input:

3
4 3 4

output:

0 6

result:

ok single line: '0 6'

Test #150:

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

input:

3
4 3 5

output:

3 3

result:

ok single line: '3 3'

Test #151:

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

input:

3
4 3 6

output:

3 3

result:

ok single line: '3 3'

Test #152:

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

input:

2
4 4

output:

0 36

result:

ok single line: '0 36'

Test #153:

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

input:

3
4 4 1

output:

0 6

result:

ok single line: '0 6'

Test #154:

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

input:

3
4 4 2

output:

0 6

result:

ok single line: '0 6'

Test #155:

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

input:

3
4 4 3

output:

0 6

result:

ok single line: '0 6'

Test #156:

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

input:

3
4 4 4

output:

0 6

result:

ok single line: '0 6'

Test #157:

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

input:

3
4 4 5

output:

0 6

result:

ok single line: '0 6'

Test #158:

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

input:

3
4 4 6

output:

0 6

result:

ok single line: '0 6'

Test #159:

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

input:

2
4 5

output:

12 24

result:

ok single line: '12 24'

Test #160:

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

input:

3
4 5 1

output:

3 3

result:

ok single line: '3 3'

Test #161:

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

input:

3
4 5 2

output:

3 3

result:

ok single line: '3 3'

Test #162:

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

input:

3
4 5 3

output:

3 3

result:

ok single line: '3 3'

Test #163:

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

input:

3
4 5 4

output:

0 6

result:

ok single line: '0 6'

Test #164:

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

input:

3
4 5 5

output:

0 6

result:

ok single line: '0 6'

Test #165:

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

input:

3
4 5 6

output:

3 3

result:

ok single line: '3 3'

Test #166:

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

input:

2
4 6

output:

12 24

result:

ok single line: '12 24'

Test #167:

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

input:

3
4 6 1

output:

3 3

result:

ok single line: '3 3'

Test #168:

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

input:

3
4 6 2

output:

3 3

result:

ok single line: '3 3'

Test #169:

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

input:

3
4 6 3

output:

3 3

result:

ok single line: '3 3'

Test #170:

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

input:

3
4 6 4

output:

0 6

result:

ok single line: '0 6'

Test #171:

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

input:

3
4 6 5

output:

3 3

result:

ok single line: '3 3'

Test #172:

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

input:

3
4 6 6

output:

0 6

result:

ok single line: '0 6'

Test #173:

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

input:

1
5

output:

60 156

result:

ok single line: '60 156'

Test #174:

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

input:

2
5 1

output:

12 24

result:

ok single line: '12 24'

Test #175:

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

input:

3
5 1 1

output:

0 6

result:

ok single line: '0 6'

Test #176:

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

input:

3
5 1 2

output:

3 3

result:

ok single line: '3 3'

Test #177:

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

input:

3
5 1 3

output:

3 3

result:

ok single line: '3 3'

Test #178:

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

input:

3
5 1 4

output:

3 3

result:

ok single line: '3 3'

Test #179:

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

input:

3
5 1 5

output:

0 6

result:

ok single line: '0 6'

Test #180:

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

input:

3
5 1 6

output:

3 3

result:

ok single line: '3 3'

Test #181:

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

input:

2
5 2

output:

12 24

result:

ok single line: '12 24'

Test #182:

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

input:

3
5 2 1

output:

3 3

result:

ok single line: '3 3'

Test #183:

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

input:

3
5 2 2

output:

0 6

result:

ok single line: '0 6'

Test #184:

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

input:

3
5 2 3

output:

3 3

result:

ok single line: '3 3'

Test #185:

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

input:

3
5 2 4

output:

3 3

result:

ok single line: '3 3'

Test #186:

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

input:

3
5 2 5

output:

0 6

result:

ok single line: '0 6'

Test #187:

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

input:

3
5 2 6

output:

3 3

result:

ok single line: '3 3'

Test #188:

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

input:

2
5 3

output:

12 24

result:

ok single line: '12 24'

Test #189:

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

input:

3
5 3 1

output:

3 3

result:

ok single line: '3 3'

Test #190:

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

input:

3
5 3 2

output:

3 3

result:

ok single line: '3 3'

Test #191:

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

input:

3
5 3 3

output:

0 6

result:

ok single line: '0 6'

Test #192:

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

input:

3
5 3 4

output:

3 3

result:

ok single line: '3 3'

Test #193:

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

input:

3
5 3 5

output:

0 6

result:

ok single line: '0 6'

Test #194:

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

input:

3
5 3 6

output:

3 3

result:

ok single line: '3 3'

Test #195:

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

input:

2
5 4

output:

12 24

result:

ok single line: '12 24'

Test #196:

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

input:

3
5 4 1

output:

3 3

result:

ok single line: '3 3'

Test #197:

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

input:

3
5 4 2

output:

3 3

result:

ok single line: '3 3'

Test #198:

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

input:

3
5 4 3

output:

3 3

result:

ok single line: '3 3'

Test #199:

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

input:

3
5 4 4

output:

0 6

result:

ok single line: '0 6'

Test #200:

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

input:

3
5 4 5

output:

0 6

result:

ok single line: '0 6'

Test #201:

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

input:

3
5 4 6

output:

3 3

result:

ok single line: '3 3'

Test #202:

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

input:

2
5 5

output:

0 36

result:

ok single line: '0 36'

Test #203:

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

input:

3
5 5 1

output:

0 6

result:

ok single line: '0 6'

Test #204:

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

input:

3
5 5 2

output:

0 6

result:

ok single line: '0 6'

Test #205:

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

input:

3
5 5 3

output:

0 6

result:

ok single line: '0 6'

Test #206:

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

input:

3
5 5 4

output:

0 6

result:

ok single line: '0 6'

Test #207:

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

input:

3
5 5 5

output:

0 6

result:

ok single line: '0 6'

Test #208:

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

input:

3
5 5 6

output:

0 6

result:

ok single line: '0 6'

Test #209:

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

input:

2
5 6

output:

12 24

result:

ok single line: '12 24'

Test #210:

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

input:

3
5 6 1

output:

3 3

result:

ok single line: '3 3'

Test #211:

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

input:

3
5 6 2

output:

3 3

result:

ok single line: '3 3'

Test #212:

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

input:

3
5 6 3

output:

3 3

result:

ok single line: '3 3'

Test #213:

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

input:

3
5 6 4

output:

3 3

result:

ok single line: '3 3'

Test #214:

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

input:

3
5 6 5

output:

0 6

result:

ok single line: '0 6'

Test #215:

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

input:

3
5 6 6

output:

0 6

result:

ok single line: '0 6'

Test #216:

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

input:

1
6

output:

60 156

result:

ok single line: '60 156'

Test #217:

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

input:

2
6 1

output:

12 24

result:

ok single line: '12 24'

Test #218:

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

input:

3
6 1 1

output:

0 6

result:

ok single line: '0 6'

Test #219:

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

input:

3
6 1 2

output:

3 3

result:

ok single line: '3 3'

Test #220:

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

input:

3
6 1 3

output:

3 3

result:

ok single line: '3 3'

Test #221:

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

input:

3
6 1 4

output:

3 3

result:

ok single line: '3 3'

Test #222:

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

input:

3
6 1 5

output:

3 3

result:

ok single line: '3 3'

Test #223:

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

input:

3
6 1 6

output:

0 6

result:

ok single line: '0 6'

Test #224:

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

input:

2
6 2

output:

12 24

result:

ok single line: '12 24'

Test #225:

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

input:

3
6 2 1

output:

3 3

result:

ok single line: '3 3'

Test #226:

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

input:

3
6 2 2

output:

0 6

result:

ok single line: '0 6'

Test #227:

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

input:

3
6 2 3

output:

3 3

result:

ok single line: '3 3'

Test #228:

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

input:

3
6 2 4

output:

3 3

result:

ok single line: '3 3'

Test #229:

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

input:

3
6 2 5

output:

3 3

result:

ok single line: '3 3'

Test #230:

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

input:

3
6 2 6

output:

0 6

result:

ok single line: '0 6'

Test #231:

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

input:

2
6 3

output:

12 24

result:

ok single line: '12 24'

Test #232:

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

input:

3
6 3 1

output:

3 3

result:

ok single line: '3 3'

Test #233:

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

input:

3
6 3 2

output:

3 3

result:

ok single line: '3 3'

Test #234:

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

input:

3
6 3 3

output:

0 6

result:

ok single line: '0 6'

Test #235:

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

input:

3
6 3 4

output:

3 3

result:

ok single line: '3 3'

Test #236:

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

input:

3
6 3 5

output:

3 3

result:

ok single line: '3 3'

Test #237:

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

input:

3
6 3 6

output:

0 6

result:

ok single line: '0 6'

Test #238:

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

input:

2
6 4

output:

12 24

result:

ok single line: '12 24'

Test #239:

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

input:

3
6 4 1

output:

3 3

result:

ok single line: '3 3'

Test #240:

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

input:

3
6 4 2

output:

3 3

result:

ok single line: '3 3'

Test #241:

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

input:

3
6 4 3

output:

3 3

result:

ok single line: '3 3'

Test #242:

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

input:

3
6 4 4

output:

0 6

result:

ok single line: '0 6'

Test #243:

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

input:

3
6 4 5

output:

3 3

result:

ok single line: '3 3'

Test #244:

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

input:

3
6 4 6

output:

0 6

result:

ok single line: '0 6'

Test #245:

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

input:

2
6 5

output:

12 24

result:

ok single line: '12 24'

Test #246:

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

input:

3
6 5 1

output:

3 3

result:

ok single line: '3 3'

Test #247:

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

input:

3
6 5 2

output:

3 3

result:

ok single line: '3 3'

Test #248:

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

input:

3
6 5 3

output:

3 3

result:

ok single line: '3 3'

Test #249:

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

input:

3
6 5 4

output:

3 3

result:

ok single line: '3 3'

Test #250:

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

input:

3
6 5 5

output:

0 6

result:

ok single line: '0 6'

Test #251:

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

input:

3
6 5 6

output:

0 6

result:

ok single line: '0 6'

Test #252:

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

input:

2
6 6

output:

0 36

result:

ok single line: '0 36'

Test #253:

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

input:

3
6 6 1

output:

0 6

result:

ok single line: '0 6'

Test #254:

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

input:

3
6 6 2

output:

0 6

result:

ok single line: '0 6'

Test #255:

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

input:

3
6 6 3

output:

0 6

result:

ok single line: '0 6'

Test #256:

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

input:

3
6 6 4

output:

0 6

result:

ok single line: '0 6'

Test #257:

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

input:

3
6 6 5

output:

0 6

result:

ok single line: '0 6'

Test #258:

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

input:

3
6 6 6

output:

0 6

result:

ok single line: '0 6'