QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#821607 | #9066. Four Die Rolls | LaVuna47# | AC ✓ | 1ms | 4200kb | C++17 | 1.7kb | 2024-12-19 16:55:19 | 2024-12-19 16:55:20 |
Judging History
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
ll f(vector<int>& a)
{
if(sz(a)==4)
{
if(sz(set<int>(all(a)))==sz(a))
return 1;
return 0;
}
ll res=0;
FOR(i,1,7)
{
a.pb(i);
res += f(a);
a.pop_back();
}
return res;
}
int solve()
{
int n;
if(!(cin>>n))return 1;
vector<int> a(n);
FOR(i,0,n)cin>>a[i];
auto res=f(a);
cout << res<<" " << pow(6,4-n)-res<<'\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
cout << "__________________________" << endl;
#endif
}
#ifdef ONPC
cerr << endl << "finished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec" << endl;
#endif
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 4104kb
input:
2 1 2
output:
12 24
result:
ok single line: '12 24'
Test #2:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
2 3 3
output:
0 36
result:
ok single line: '0 36'
Test #3:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
1 1
output:
60 156
result:
ok single line: '60 156'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3996kb
input:
2 1 1
output:
0 36
result:
ok single line: '0 36'
Test #5:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 1 1 1
output:
0 6
result:
ok single line: '0 6'
Test #6:
score: 0
Accepted
time: 1ms
memory: 4192kb
input:
3 1 1 2
output:
0 6
result:
ok single line: '0 6'
Test #7:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 1 1 3
output:
0 6
result:
ok single line: '0 6'
Test #8:
score: 0
Accepted
time: 1ms
memory: 4068kb
input:
3 1 1 4
output:
0 6
result:
ok single line: '0 6'
Test #9:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
3 1 1 5
output:
0 6
result:
ok single line: '0 6'
Test #10:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 1 1 6
output:
0 6
result:
ok single line: '0 6'
Test #11:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 1 2 1
output:
0 6
result:
ok single line: '0 6'
Test #12:
score: 0
Accepted
time: 0ms
memory: 4044kb
input:
3 1 2 2
output:
0 6
result:
ok single line: '0 6'
Test #13:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
3 1 2 3
output:
3 3
result:
ok single line: '3 3'
Test #14:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 1 2 4
output:
3 3
result:
ok single line: '3 3'
Test #15:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 1 2 5
output:
3 3
result:
ok single line: '3 3'
Test #16:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
3 1 2 6
output:
3 3
result:
ok single line: '3 3'
Test #17:
score: 0
Accepted
time: 0ms
memory: 4196kb
input:
2 1 3
output:
12 24
result:
ok single line: '12 24'
Test #18:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 1 3 1
output:
0 6
result:
ok single line: '0 6'
Test #19:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
3 1 3 2
output:
3 3
result:
ok single line: '3 3'
Test #20:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 1 3 3
output:
0 6
result:
ok single line: '0 6'
Test #21:
score: 0
Accepted
time: 1ms
memory: 4112kb
input:
3 1 3 4
output:
3 3
result:
ok single line: '3 3'
Test #22:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 1 3 5
output:
3 3
result:
ok single line: '3 3'
Test #23:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
3 1 3 6
output:
3 3
result:
ok single line: '3 3'
Test #24:
score: 0
Accepted
time: 1ms
memory: 4108kb
input:
2 1 4
output:
12 24
result:
ok single line: '12 24'
Test #25:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 1 4 1
output:
0 6
result:
ok single line: '0 6'
Test #26:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 1 4 2
output:
3 3
result:
ok single line: '3 3'
Test #27:
score: 0
Accepted
time: 0ms
memory: 4164kb
input:
3 1 4 3
output:
3 3
result:
ok single line: '3 3'
Test #28:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
3 1 4 4
output:
0 6
result:
ok single line: '0 6'
Test #29:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 1 4 5
output:
3 3
result:
ok single line: '3 3'
Test #30:
score: 0
Accepted
time: 0ms
memory: 4108kb
input:
3 1 4 6
output:
3 3
result:
ok single line: '3 3'
Test #31:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
2 1 5
output:
12 24
result:
ok single line: '12 24'
Test #32:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 1 5 1
output:
0 6
result:
ok single line: '0 6'
Test #33:
score: 0
Accepted
time: 0ms
memory: 4156kb
input:
3 1 5 2
output:
3 3
result:
ok single line: '3 3'
Test #34:
score: 0
Accepted
time: 0ms
memory: 4200kb
input:
3 1 5 3
output:
3 3
result:
ok single line: '3 3'
Test #35:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
3 1 5 4
output:
3 3
result:
ok single line: '3 3'
Test #36:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 1 5 5
output:
0 6
result:
ok single line: '0 6'
Test #37:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 1 5 6
output:
3 3
result:
ok single line: '3 3'
Test #38:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
2 1 6
output:
12 24
result:
ok single line: '12 24'
Test #39:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 1 6 1
output:
0 6
result:
ok single line: '0 6'
Test #40:
score: 0
Accepted
time: 0ms
memory: 4196kb
input:
3 1 6 2
output:
3 3
result:
ok single line: '3 3'
Test #41:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 1 6 3
output:
3 3
result:
ok single line: '3 3'
Test #42:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
3 1 6 4
output:
3 3
result:
ok single line: '3 3'
Test #43:
score: 0
Accepted
time: 0ms
memory: 4172kb
input:
3 1 6 5
output:
3 3
result:
ok single line: '3 3'
Test #44:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 1 6 6
output:
0 6
result:
ok single line: '0 6'
Test #45:
score: 0
Accepted
time: 1ms
memory: 4100kb
input:
1 2
output:
60 156
result:
ok single line: '60 156'
Test #46:
score: 0
Accepted
time: 0ms
memory: 4036kb
input:
2 2 1
output:
12 24
result:
ok single line: '12 24'
Test #47:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 2 1 1
output:
0 6
result:
ok single line: '0 6'
Test #48:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 2 1 2
output:
0 6
result:
ok single line: '0 6'
Test #49:
score: 0
Accepted
time: 0ms
memory: 4136kb
input:
3 2 1 3
output:
3 3
result:
ok single line: '3 3'
Test #50:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 2 1 4
output:
3 3
result:
ok single line: '3 3'
Test #51:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
3 2 1 5
output:
3 3
result:
ok single line: '3 3'
Test #52:
score: 0
Accepted
time: 1ms
memory: 4144kb
input:
3 2 1 6
output:
3 3
result:
ok single line: '3 3'
Test #53:
score: 0
Accepted
time: 0ms
memory: 4164kb
input:
2 2 2
output:
0 36
result:
ok single line: '0 36'
Test #54:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 2 2 1
output:
0 6
result:
ok single line: '0 6'
Test #55:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 2 2 2
output:
0 6
result:
ok single line: '0 6'
Test #56:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 2 2 3
output:
0 6
result:
ok single line: '0 6'
Test #57:
score: 0
Accepted
time: 0ms
memory: 4068kb
input:
3 2 2 4
output:
0 6
result:
ok single line: '0 6'
Test #58:
score: 0
Accepted
time: 0ms
memory: 4136kb
input:
3 2 2 5
output:
0 6
result:
ok single line: '0 6'
Test #59:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 2 2 6
output:
0 6
result:
ok single line: '0 6'
Test #60:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
2 2 3
output:
12 24
result:
ok single line: '12 24'
Test #61:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 2 3 1
output:
3 3
result:
ok single line: '3 3'
Test #62:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 2 3 2
output:
0 6
result:
ok single line: '0 6'
Test #63:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 2 3 3
output:
0 6
result:
ok single line: '0 6'
Test #64:
score: 0
Accepted
time: 0ms
memory: 4152kb
input:
3 2 3 4
output:
3 3
result:
ok single line: '3 3'
Test #65:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 2 3 5
output:
3 3
result:
ok single line: '3 3'
Test #66:
score: 0
Accepted
time: 0ms
memory: 4148kb
input:
3 2 3 6
output:
3 3
result:
ok single line: '3 3'
Test #67:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
2 2 4
output:
12 24
result:
ok single line: '12 24'
Test #68:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
3 2 4 1
output:
3 3
result:
ok single line: '3 3'
Test #69:
score: 0
Accepted
time: 0ms
memory: 4152kb
input:
3 2 4 2
output:
0 6
result:
ok single line: '0 6'
Test #70:
score: 0
Accepted
time: 0ms
memory: 4148kb
input:
3 2 4 3
output:
3 3
result:
ok single line: '3 3'
Test #71:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 2 4 4
output:
0 6
result:
ok single line: '0 6'
Test #72:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 2 4 5
output:
3 3
result:
ok single line: '3 3'
Test #73:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
3 2 4 6
output:
3 3
result:
ok single line: '3 3'
Test #74:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
2 2 5
output:
12 24
result:
ok single line: '12 24'
Test #75:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 2 5 1
output:
3 3
result:
ok single line: '3 3'
Test #76:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 2 5 2
output:
0 6
result:
ok single line: '0 6'
Test #77:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
3 2 5 3
output:
3 3
result:
ok single line: '3 3'
Test #78:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
3 2 5 4
output:
3 3
result:
ok single line: '3 3'
Test #79:
score: 0
Accepted
time: 0ms
memory: 4152kb
input:
3 2 5 5
output:
0 6
result:
ok single line: '0 6'
Test #80:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 2 5 6
output:
3 3
result:
ok single line: '3 3'
Test #81:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
2 2 6
output:
12 24
result:
ok single line: '12 24'
Test #82:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 2 6 1
output:
3 3
result:
ok single line: '3 3'
Test #83:
score: 0
Accepted
time: 1ms
memory: 4040kb
input:
3 2 6 2
output:
0 6
result:
ok single line: '0 6'
Test #84:
score: 0
Accepted
time: 0ms
memory: 4136kb
input:
3 2 6 3
output:
3 3
result:
ok single line: '3 3'
Test #85:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 2 6 4
output:
3 3
result:
ok single line: '3 3'
Test #86:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
3 2 6 5
output:
3 3
result:
ok single line: '3 3'
Test #87:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 2 6 6
output:
0 6
result:
ok single line: '0 6'
Test #88:
score: 0
Accepted
time: 0ms
memory: 4076kb
input:
1 3
output:
60 156
result:
ok single line: '60 156'
Test #89:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
2 3 1
output:
12 24
result:
ok single line: '12 24'
Test #90:
score: 0
Accepted
time: 1ms
memory: 4040kb
input:
3 3 1 1
output:
0 6
result:
ok single line: '0 6'
Test #91:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 3 1 2
output:
3 3
result:
ok single line: '3 3'
Test #92:
score: 0
Accepted
time: 1ms
memory: 4148kb
input:
3 3 1 3
output:
0 6
result:
ok single line: '0 6'
Test #93:
score: 0
Accepted
time: 1ms
memory: 4100kb
input:
3 3 1 4
output:
3 3
result:
ok single line: '3 3'
Test #94:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
3 3 1 5
output:
3 3
result:
ok single line: '3 3'
Test #95:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 3 1 6
output:
3 3
result:
ok single line: '3 3'
Test #96:
score: 0
Accepted
time: 0ms
memory: 4136kb
input:
2 3 2
output:
12 24
result:
ok single line: '12 24'
Test #97:
score: 0
Accepted
time: 0ms
memory: 4164kb
input:
3 3 2 1
output:
3 3
result:
ok single line: '3 3'
Test #98:
score: 0
Accepted
time: 0ms
memory: 4044kb
input:
3 3 2 2
output:
0 6
result:
ok single line: '0 6'
Test #99:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 3 2 3
output:
0 6
result:
ok single line: '0 6'
Test #100:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 3 2 4
output:
3 3
result:
ok single line: '3 3'
Test #101:
score: 0
Accepted
time: 0ms
memory: 4148kb
input:
3 3 2 5
output:
3 3
result:
ok single line: '3 3'
Test #102:
score: 0
Accepted
time: 0ms
memory: 4156kb
input:
3 3 2 6
output:
3 3
result:
ok single line: '3 3'
Test #103:
score: 0
Accepted
time: 0ms
memory: 4036kb
input:
3 3 3 1
output:
0 6
result:
ok single line: '0 6'
Test #104:
score: 0
Accepted
time: 0ms
memory: 4164kb
input:
3 3 3 2
output:
0 6
result:
ok single line: '0 6'
Test #105:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 3 3 3
output:
0 6
result:
ok single line: '0 6'
Test #106:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 3 3 4
output:
0 6
result:
ok single line: '0 6'
Test #107:
score: 0
Accepted
time: 0ms
memory: 4056kb
input:
3 3 3 5
output:
0 6
result:
ok single line: '0 6'
Test #108:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 3 3 6
output:
0 6
result:
ok single line: '0 6'
Test #109:
score: 0
Accepted
time: 0ms
memory: 4004kb
input:
2 3 4
output:
12 24
result:
ok single line: '12 24'
Test #110:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 3 4 1
output:
3 3
result:
ok single line: '3 3'
Test #111:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 3 4 2
output:
3 3
result:
ok single line: '3 3'
Test #112:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 3 4 3
output:
0 6
result:
ok single line: '0 6'
Test #113:
score: 0
Accepted
time: 0ms
memory: 4120kb
input:
3 3 4 4
output:
0 6
result:
ok single line: '0 6'
Test #114:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 3 4 5
output:
3 3
result:
ok single line: '3 3'
Test #115:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 3 4 6
output:
3 3
result:
ok single line: '3 3'
Test #116:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
2 3 5
output:
12 24
result:
ok single line: '12 24'
Test #117:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 3 5 1
output:
3 3
result:
ok single line: '3 3'
Test #118:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
3 3 5 2
output:
3 3
result:
ok single line: '3 3'
Test #119:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
3 3 5 3
output:
0 6
result:
ok single line: '0 6'
Test #120:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 3 5 4
output:
3 3
result:
ok single line: '3 3'
Test #121:
score: 0
Accepted
time: 1ms
memory: 4140kb
input:
3 3 5 5
output:
0 6
result:
ok single line: '0 6'
Test #122:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 3 5 6
output:
3 3
result:
ok single line: '3 3'
Test #123:
score: 0
Accepted
time: 0ms
memory: 4028kb
input:
2 3 6
output:
12 24
result:
ok single line: '12 24'
Test #124:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 3 6 1
output:
3 3
result:
ok single line: '3 3'
Test #125:
score: 0
Accepted
time: 0ms
memory: 4036kb
input:
3 3 6 2
output:
3 3
result:
ok single line: '3 3'
Test #126:
score: 0
Accepted
time: 1ms
memory: 4044kb
input:
3 3 6 3
output:
0 6
result:
ok single line: '0 6'
Test #127:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
3 3 6 4
output:
3 3
result:
ok single line: '3 3'
Test #128:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 3 6 5
output:
3 3
result:
ok single line: '3 3'
Test #129:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 3 6 6
output:
0 6
result:
ok single line: '0 6'
Test #130:
score: 0
Accepted
time: 1ms
memory: 4144kb
input:
1 4
output:
60 156
result:
ok single line: '60 156'
Test #131:
score: 0
Accepted
time: 1ms
memory: 4172kb
input:
2 4 1
output:
12 24
result:
ok single line: '12 24'
Test #132:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 4 1 1
output:
0 6
result:
ok single line: '0 6'
Test #133:
score: 0
Accepted
time: 0ms
memory: 4108kb
input:
3 4 1 2
output:
3 3
result:
ok single line: '3 3'
Test #134:
score: 0
Accepted
time: 0ms
memory: 4044kb
input:
3 4 1 3
output:
3 3
result:
ok single line: '3 3'
Test #135:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 4 1 4
output:
0 6
result:
ok single line: '0 6'
Test #136:
score: 0
Accepted
time: 0ms
memory: 4016kb
input:
3 4 1 5
output:
3 3
result:
ok single line: '3 3'
Test #137:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
3 4 1 6
output:
3 3
result:
ok single line: '3 3'
Test #138:
score: 0
Accepted
time: 0ms
memory: 4148kb
input:
2 4 2
output:
12 24
result:
ok single line: '12 24'
Test #139:
score: 0
Accepted
time: 1ms
memory: 4092kb
input:
3 4 2 1
output:
3 3
result:
ok single line: '3 3'
Test #140:
score: 0
Accepted
time: 0ms
memory: 4152kb
input:
3 4 2 2
output:
0 6
result:
ok single line: '0 6'
Test #141:
score: 0
Accepted
time: 0ms
memory: 4180kb
input:
3 4 2 3
output:
3 3
result:
ok single line: '3 3'
Test #142:
score: 0
Accepted
time: 0ms
memory: 4200kb
input:
3 4 2 4
output:
0 6
result:
ok single line: '0 6'
Test #143:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 4 2 5
output:
3 3
result:
ok single line: '3 3'
Test #144:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 4 2 6
output:
3 3
result:
ok single line: '3 3'
Test #145:
score: 0
Accepted
time: 1ms
memory: 4112kb
input:
2 4 3
output:
12 24
result:
ok single line: '12 24'
Test #146:
score: 0
Accepted
time: 0ms
memory: 4036kb
input:
3 4 3 1
output:
3 3
result:
ok single line: '3 3'
Test #147:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
3 4 3 2
output:
3 3
result:
ok single line: '3 3'
Test #148:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
3 4 3 3
output:
0 6
result:
ok single line: '0 6'
Test #149:
score: 0
Accepted
time: 1ms
memory: 4004kb
input:
3 4 3 4
output:
0 6
result:
ok single line: '0 6'
Test #150:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 4 3 5
output:
3 3
result:
ok single line: '3 3'
Test #151:
score: 0
Accepted
time: 0ms
memory: 4148kb
input:
3 4 3 6
output:
3 3
result:
ok single line: '3 3'
Test #152:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
2 4 4
output:
0 36
result:
ok single line: '0 36'
Test #153:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
3 4 4 1
output:
0 6
result:
ok single line: '0 6'
Test #154:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
3 4 4 2
output:
0 6
result:
ok single line: '0 6'
Test #155:
score: 0
Accepted
time: 0ms
memory: 4120kb
input:
3 4 4 3
output:
0 6
result:
ok single line: '0 6'
Test #156:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 4 4 4
output:
0 6
result:
ok single line: '0 6'
Test #157:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
3 4 4 5
output:
0 6
result:
ok single line: '0 6'
Test #158:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 4 4 6
output:
0 6
result:
ok single line: '0 6'
Test #159:
score: 0
Accepted
time: 0ms
memory: 4064kb
input:
2 4 5
output:
12 24
result:
ok single line: '12 24'
Test #160:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 4 5 1
output:
3 3
result:
ok single line: '3 3'
Test #161:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 4 5 2
output:
3 3
result:
ok single line: '3 3'
Test #162:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 4 5 3
output:
3 3
result:
ok single line: '3 3'
Test #163:
score: 0
Accepted
time: 0ms
memory: 4056kb
input:
3 4 5 4
output:
0 6
result:
ok single line: '0 6'
Test #164:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
3 4 5 5
output:
0 6
result:
ok single line: '0 6'
Test #165:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 4 5 6
output:
3 3
result:
ok single line: '3 3'
Test #166:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
2 4 6
output:
12 24
result:
ok single line: '12 24'
Test #167:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 4 6 1
output:
3 3
result:
ok single line: '3 3'
Test #168:
score: 0
Accepted
time: 0ms
memory: 4172kb
input:
3 4 6 2
output:
3 3
result:
ok single line: '3 3'
Test #169:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 4 6 3
output:
3 3
result:
ok single line: '3 3'
Test #170:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 4 6 4
output:
0 6
result:
ok single line: '0 6'
Test #171:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 4 6 5
output:
3 3
result:
ok single line: '3 3'
Test #172:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
3 4 6 6
output:
0 6
result:
ok single line: '0 6'
Test #173:
score: 0
Accepted
time: 0ms
memory: 4136kb
input:
1 5
output:
60 156
result:
ok single line: '60 156'
Test #174:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
2 5 1
output:
12 24
result:
ok single line: '12 24'
Test #175:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 5 1 1
output:
0 6
result:
ok single line: '0 6'
Test #176:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 5 1 2
output:
3 3
result:
ok single line: '3 3'
Test #177:
score: 0
Accepted
time: 0ms
memory: 4192kb
input:
3 5 1 3
output:
3 3
result:
ok single line: '3 3'
Test #178:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 5 1 4
output:
3 3
result:
ok single line: '3 3'
Test #179:
score: 0
Accepted
time: 1ms
memory: 4096kb
input:
3 5 1 5
output:
0 6
result:
ok single line: '0 6'
Test #180:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 5 1 6
output:
3 3
result:
ok single line: '3 3'
Test #181:
score: 0
Accepted
time: 0ms
memory: 4148kb
input:
2 5 2
output:
12 24
result:
ok single line: '12 24'
Test #182:
score: 0
Accepted
time: 1ms
memory: 4116kb
input:
3 5 2 1
output:
3 3
result:
ok single line: '3 3'
Test #183:
score: 0
Accepted
time: 0ms
memory: 4192kb
input:
3 5 2 2
output:
0 6
result:
ok single line: '0 6'
Test #184:
score: 0
Accepted
time: 0ms
memory: 4104kb
input:
3 5 2 3
output:
3 3
result:
ok single line: '3 3'
Test #185:
score: 0
Accepted
time: 0ms
memory: 4148kb
input:
3 5 2 4
output:
3 3
result:
ok single line: '3 3'
Test #186:
score: 0
Accepted
time: 0ms
memory: 4192kb
input:
3 5 2 5
output:
0 6
result:
ok single line: '0 6'
Test #187:
score: 0
Accepted
time: 1ms
memory: 4140kb
input:
3 5 2 6
output:
3 3
result:
ok single line: '3 3'
Test #188:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
2 5 3
output:
12 24
result:
ok single line: '12 24'
Test #189:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 5 3 1
output:
3 3
result:
ok single line: '3 3'
Test #190:
score: 0
Accepted
time: 1ms
memory: 4172kb
input:
3 5 3 2
output:
3 3
result:
ok single line: '3 3'
Test #191:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 5 3 3
output:
0 6
result:
ok single line: '0 6'
Test #192:
score: 0
Accepted
time: 0ms
memory: 4032kb
input:
3 5 3 4
output:
3 3
result:
ok single line: '3 3'
Test #193:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 5 3 5
output:
0 6
result:
ok single line: '0 6'
Test #194:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
3 5 3 6
output:
3 3
result:
ok single line: '3 3'
Test #195:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
2 5 4
output:
12 24
result:
ok single line: '12 24'
Test #196:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 5 4 1
output:
3 3
result:
ok single line: '3 3'
Test #197:
score: 0
Accepted
time: 0ms
memory: 4056kb
input:
3 5 4 2
output:
3 3
result:
ok single line: '3 3'
Test #198:
score: 0
Accepted
time: 1ms
memory: 4092kb
input:
3 5 4 3
output:
3 3
result:
ok single line: '3 3'
Test #199:
score: 0
Accepted
time: 0ms
memory: 4036kb
input:
3 5 4 4
output:
0 6
result:
ok single line: '0 6'
Test #200:
score: 0
Accepted
time: 0ms
memory: 4152kb
input:
3 5 4 5
output:
0 6
result:
ok single line: '0 6'
Test #201:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
3 5 4 6
output:
3 3
result:
ok single line: '3 3'
Test #202:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
2 5 5
output:
0 36
result:
ok single line: '0 36'
Test #203:
score: 0
Accepted
time: 1ms
memory: 4040kb
input:
3 5 5 1
output:
0 6
result:
ok single line: '0 6'
Test #204:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
3 5 5 2
output:
0 6
result:
ok single line: '0 6'
Test #205:
score: 0
Accepted
time: 0ms
memory: 4172kb
input:
3 5 5 3
output:
0 6
result:
ok single line: '0 6'
Test #206:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 5 5 4
output:
0 6
result:
ok single line: '0 6'
Test #207:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 5 5 5
output:
0 6
result:
ok single line: '0 6'
Test #208:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 5 5 6
output:
0 6
result:
ok single line: '0 6'
Test #209:
score: 0
Accepted
time: 0ms
memory: 4200kb
input:
2 5 6
output:
12 24
result:
ok single line: '12 24'
Test #210:
score: 0
Accepted
time: 1ms
memory: 4148kb
input:
3 5 6 1
output:
3 3
result:
ok single line: '3 3'
Test #211:
score: 0
Accepted
time: 0ms
memory: 4108kb
input:
3 5 6 2
output:
3 3
result:
ok single line: '3 3'
Test #212:
score: 0
Accepted
time: 0ms
memory: 4108kb
input:
3 5 6 3
output:
3 3
result:
ok single line: '3 3'
Test #213:
score: 0
Accepted
time: 0ms
memory: 4148kb
input:
3 5 6 4
output:
3 3
result:
ok single line: '3 3'
Test #214:
score: 0
Accepted
time: 0ms
memory: 4152kb
input:
3 5 6 5
output:
0 6
result:
ok single line: '0 6'
Test #215:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
3 5 6 6
output:
0 6
result:
ok single line: '0 6'
Test #216:
score: 0
Accepted
time: 0ms
memory: 4092kb
input:
1 6
output:
60 156
result:
ok single line: '60 156'
Test #217:
score: 0
Accepted
time: 0ms
memory: 4140kb
input:
2 6 1
output:
12 24
result:
ok single line: '12 24'
Test #218:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 6 1 1
output:
0 6
result:
ok single line: '0 6'
Test #219:
score: 0
Accepted
time: 1ms
memory: 4100kb
input:
3 6 1 2
output:
3 3
result:
ok single line: '3 3'
Test #220:
score: 0
Accepted
time: 0ms
memory: 4152kb
input:
3 6 1 3
output:
3 3
result:
ok single line: '3 3'
Test #221:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
3 6 1 4
output:
3 3
result:
ok single line: '3 3'
Test #222:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
3 6 1 5
output:
3 3
result:
ok single line: '3 3'
Test #223:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 6 1 6
output:
0 6
result:
ok single line: '0 6'
Test #224:
score: 0
Accepted
time: 0ms
memory: 4108kb
input:
2 6 2
output:
12 24
result:
ok single line: '12 24'
Test #225:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
3 6 2 1
output:
3 3
result:
ok single line: '3 3'
Test #226:
score: 0
Accepted
time: 1ms
memory: 4108kb
input:
3 6 2 2
output:
0 6
result:
ok single line: '0 6'
Test #227:
score: 0
Accepted
time: 0ms
memory: 4012kb
input:
3 6 2 3
output:
3 3
result:
ok single line: '3 3'
Test #228:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 6 2 4
output:
3 3
result:
ok single line: '3 3'
Test #229:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 6 2 5
output:
3 3
result:
ok single line: '3 3'
Test #230:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
3 6 2 6
output:
0 6
result:
ok single line: '0 6'
Test #231:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
2 6 3
output:
12 24
result:
ok single line: '12 24'
Test #232:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
3 6 3 1
output:
3 3
result:
ok single line: '3 3'
Test #233:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 6 3 2
output:
3 3
result:
ok single line: '3 3'
Test #234:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 6 3 3
output:
0 6
result:
ok single line: '0 6'
Test #235:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 6 3 4
output:
3 3
result:
ok single line: '3 3'
Test #236:
score: 0
Accepted
time: 0ms
memory: 4144kb
input:
3 6 3 5
output:
3 3
result:
ok single line: '3 3'
Test #237:
score: 0
Accepted
time: 1ms
memory: 4148kb
input:
3 6 3 6
output:
0 6
result:
ok single line: '0 6'
Test #238:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
2 6 4
output:
12 24
result:
ok single line: '12 24'
Test #239:
score: 0
Accepted
time: 0ms
memory: 4100kb
input:
3 6 4 1
output:
3 3
result:
ok single line: '3 3'
Test #240:
score: 0
Accepted
time: 0ms
memory: 4196kb
input:
3 6 4 2
output:
3 3
result:
ok single line: '3 3'
Test #241:
score: 0
Accepted
time: 0ms
memory: 4168kb
input:
3 6 4 3
output:
3 3
result:
ok single line: '3 3'
Test #242:
score: 0
Accepted
time: 0ms
memory: 4196kb
input:
3 6 4 4
output:
0 6
result:
ok single line: '0 6'
Test #243:
score: 0
Accepted
time: 1ms
memory: 4144kb
input:
3 6 4 5
output:
3 3
result:
ok single line: '3 3'
Test #244:
score: 0
Accepted
time: 0ms
memory: 4172kb
input:
3 6 4 6
output:
0 6
result:
ok single line: '0 6'
Test #245:
score: 0
Accepted
time: 0ms
memory: 4008kb
input:
2 6 5
output:
12 24
result:
ok single line: '12 24'
Test #246:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 6 5 1
output:
3 3
result:
ok single line: '3 3'
Test #247:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
3 6 5 2
output:
3 3
result:
ok single line: '3 3'
Test #248:
score: 0
Accepted
time: 0ms
memory: 4012kb
input:
3 6 5 3
output:
3 3
result:
ok single line: '3 3'
Test #249:
score: 0
Accepted
time: 0ms
memory: 4172kb
input:
3 6 5 4
output:
3 3
result:
ok single line: '3 3'
Test #250:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 6 5 5
output:
0 6
result:
ok single line: '0 6'
Test #251:
score: 0
Accepted
time: 0ms
memory: 4064kb
input:
3 6 5 6
output:
0 6
result:
ok single line: '0 6'
Test #252:
score: 0
Accepted
time: 1ms
memory: 4172kb
input:
2 6 6
output:
0 36
result:
ok single line: '0 36'
Test #253:
score: 0
Accepted
time: 1ms
memory: 4144kb
input:
3 6 6 1
output:
0 6
result:
ok single line: '0 6'
Test #254:
score: 0
Accepted
time: 0ms
memory: 4096kb
input:
3 6 6 2
output:
0 6
result:
ok single line: '0 6'
Test #255:
score: 0
Accepted
time: 0ms
memory: 4176kb
input:
3 6 6 3
output:
0 6
result:
ok single line: '0 6'
Test #256:
score: 0
Accepted
time: 0ms
memory: 4044kb
input:
3 6 6 4
output:
0 6
result:
ok single line: '0 6'
Test #257:
score: 0
Accepted
time: 0ms
memory: 4116kb
input:
3 6 6 5
output:
0 6
result:
ok single line: '0 6'
Test #258:
score: 0
Accepted
time: 1ms
memory: 4196kb
input:
3 6 6 6
output:
0 6
result:
ok single line: '0 6'