Submission #1192465
Source Code Expand
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #include<complex> #include<map> #define vi vector<int> #define vvi vector<vector<int> > #define ll long long int #define vl vector<ll> #define vvl vector<vector<ll>> #define vb vector<bool> #define vc vector<char> #define vs vector<string> #define ld long double #define INF 1e9 #define EPS 0.0000000001 #define rep(i,n) for(int i=0;i<n;i++) #define loop(i,s,n) for(int i=s;i<n;i++) #define all(in) in.begin(), in.end() template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; } template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; } #define MAX 9999999 using namespace std; typedef pair<int, int> pii; typedef pair<double,double>pdd; typedef pair<ll,ll>pll; vb used(10,true); map<pii,int>mp; int hoge; void solve(int a,int b){ if(a*b==hoge){pii t=pii(a,b);mp[t]++; return; } for(int i=b+1;i<=9;i++) solve(a,i); return; } int main(){ int n; cin>>n; int let=0; rep(i,10)rep(j,10)let+=i*j; hoge=let-n; for(int i=1;i<10;i++)solve(i,1); for(auto itr=mp.begin(); itr!=mp.end();itr++){ cout<<itr->first.first<<"x"<<itr->first.second<<endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 九九足し算 |
User | yebityon |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1373 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | sample_01.txt, sample_02.txt, test_1953.txt, test_1971.txt, test_1977.txt, test_1983.txt, test_1989.txt, test_1990.txt, test_1993.txt, test_1995.txt, test_1997.txt, test_1998.txt, test_2001.txt, test_2009.txt, test_2013.txt, test_2017.txt, test_2019.txt, test_2020.txt, test_2022.txt, test_2024.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | WA | 1 ms | 256 KB |
sample_02.txt | WA | 1 ms | 256 KB |
test_1953.txt | WA | 1 ms | 256 KB |
test_1971.txt | WA | 1 ms | 256 KB |
test_1977.txt | WA | 1 ms | 256 KB |
test_1983.txt | WA | 1 ms | 256 KB |
test_1989.txt | WA | 1 ms | 256 KB |
test_1990.txt | WA | 1 ms | 256 KB |
test_1993.txt | WA | 1 ms | 256 KB |
test_1995.txt | WA | 1 ms | 256 KB |
test_1997.txt | WA | 1 ms | 256 KB |
test_1998.txt | WA | 1 ms | 256 KB |
test_2001.txt | WA | 1 ms | 256 KB |
test_2009.txt | WA | 1 ms | 256 KB |
test_2013.txt | WA | 1 ms | 256 KB |
test_2017.txt | WA | 1 ms | 256 KB |
test_2019.txt | WA | 1 ms | 256 KB |
test_2020.txt | WA | 1 ms | 256 KB |
test_2022.txt | WA | 1 ms | 256 KB |
test_2024.txt | WA | 1 ms | 256 KB |