Submission #201361
Source Code Expand
#include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <deque> #include <complex> #include <stack> #include <queue> #include <cstdio> #include <cctype> #include <cstring> #include <ctime> #include <iterator> #include <bitset> #include <numeric> #include <list> #include <iomanip> #if __cplusplus >= 201103L #include <array> #include <tuple> #include <initializer_list> #include <unordered_set> #include <unordered_map> #include <forward_list> #define cauto const auto& #endif using namespace std; typedef long long LL; typedef pair<int,int> pii; typedef pair<LL,LL> pll; typedef vector<int> vint; typedef vector<vector<int> > vvint; typedef vector<long long> vll, vLL; typedef vector<vector<long long> > vvll, vvLL; #define VV(T) vector<vector< T > > template <class T> void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){ v.assign(a, vector<T>(b, t)); } template <class F, class T> void convert(const F &f, T &t){ stringstream ss; ss << f; ss >> t; } #define REP(i,n) for(int i=0;i<int(n);++i) #define ALL(v) (v).begin(),(v).end() #define RALL(v) (v).rbegin(),(v).rend() #define PB push_back #define MOD 1000000007LL #define EPS 1e-8 int main(){ map<int,vint> mp; int s = 0, n; for(int i = 1; i <= 9; ++i) for(int j = 1; j <= 9; ++j){ s += i * j; mp[i * j].push_back(i * 10 + j); } cin >> n; vint &v = mp[s - n]; for(int x : v){ printf("%d x %d\n", x / 10, x % 10); } }
Submission Info
Submission Time | |
---|---|
Task | C - 九九足し算 |
User | climpet |
Language | C++11 (GCC 4.8.1) |
Score | 100 |
Code Size | 1727 Byte |
Status | AC |
Exec Time | 22 ms |
Memory | 932 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 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 | AC | 22 ms | 804 KB |
sample_02.txt | AC | 21 ms | 924 KB |
test_1953.txt | AC | 22 ms | 796 KB |
test_1971.txt | AC | 21 ms | 804 KB |
test_1977.txt | AC | 22 ms | 800 KB |
test_1983.txt | AC | 21 ms | 932 KB |
test_1989.txt | AC | 21 ms | 920 KB |
test_1990.txt | AC | 22 ms | 800 KB |
test_1993.txt | AC | 21 ms | 924 KB |
test_1995.txt | AC | 22 ms | 800 KB |
test_1997.txt | AC | 22 ms | 800 KB |
test_1998.txt | AC | 22 ms | 796 KB |
test_2001.txt | AC | 22 ms | 796 KB |
test_2009.txt | AC | 21 ms | 800 KB |
test_2013.txt | AC | 21 ms | 928 KB |
test_2017.txt | AC | 22 ms | 804 KB |
test_2019.txt | AC | 21 ms | 800 KB |
test_2020.txt | AC | 22 ms | 928 KB |
test_2022.txt | AC | 22 ms | 800 KB |
test_2024.txt | AC | 21 ms | 932 KB |