Submission #305572
Source Code Expand
#include <bits/stdc++.h> #define all(x) begin(x), end(x) #define rall(x) (x).rbegin(),(x).rend() #define sz(x) ((int)(x).size()) #define REP(i,b,n) for(int i=(int)(b);i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #define repsz(i,v) rep(i,sz(v)) #define eb emplace_back #define mt make_tuple #define aur auto& #define bit(n) (1LL<<(n)) using namespace std; typedef long long ll; //#define int long long static const int INF = 1<<25; static const double EPS = 1e-5; template<class T>bool chmin(T&a,const T&b){if(a<=b)return false;a=b;return true;} template<class T>bool chmax(T&a,const T&b){if(a>=b)return false;a=b;return true;} bool solve(){ int n; cin >> n; int k = 1; rep(_, n) k *= 10; int i = k - 1; rep(_, k+1){ cout << setw(n) << setfill('0') << i << endl; i = (i + 1) % k; } return true; } signed main(){ //cin.tie(0); //ios_base::sync_with_stdio(0); cout.setf(ios::fixed); cout.precision(10); solve(); return 0; } // vim:set foldmethod=marker commentstring=//%s:
Submission Info
Submission Time | |
---|---|
Task | A - Lock |
User | MiSawa |
Language | C++11 (GCC 4.8.1) |
Score | 0 |
Code Size | 1072 Byte |
Status | WA |
Exec Time | 322 ms |
Memory | 1236 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | subtask0_sample_01.txt, subtask0_sample_02.txt |
All | subtask0_sample_01.txt, subtask0_sample_02.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
subtask0_sample_01.txt | AC | 29 ms | 1176 KB |
subtask0_sample_02.txt | WA | 29 ms | 1236 KB |
subtask1_01.txt | WA | 31 ms | 1168 KB |
subtask1_02.txt | WA | 55 ms | 1176 KB |
subtask1_03.txt | WA | 322 ms | 1236 KB |