結果

問題 No.490 yukiソート
ユーザー mmn15277198mmn15277198
提出日時 2021-02-10 18:33:11
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 3,013 bytes
コンパイル時間 950 ms
コンパイル使用メモリ 103,288 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-22 13:33:54
合計ジャッジ時間 2,383 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 1 ms
4,376 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

//#include <bits/stdc++>
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <math.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int , int> pair_ii;
typedef pair<ll , ll> pair_ll;

#define rep(i , x , n) for(int (i) = (x); i < (n); i++)
#define rrep(i , n , x) for(int (i) = (n); i >= (x); i--)

const int mod = 1000000007;
const int INF = 100100100;
const double pi = 3.14159265358979;

//vector<int> ans;
//set<ll> ans;
//vector<int> table(20010 , 0);
//vector<int> dp(n + 10 , 0);
//vector<vector<int>> dp(n + 10 , vector<int>(2 , 0));

ll gcd(ll a , ll b){if(a < b)swap(a , b);if(a % b == 0)return b;else return gcd(b , a % b);}
ll lcm(ll a , ll b){return a / gcd(a , b) * b;}
bool chmax(ll &a , ll &b){if(a < b){a = b;return true;}else{return false;}}
bool chmin(ll &a , ll &b){if(a > b){a = b;return true;}else{return false;}}

bool is_prime(ll n){
	if(n == 2 || n == 3 || n == 5 || n == 7)return true;
	for(int i = 2; i * i <= n; i++){if(n % i == 0)return false;}
	return true;
}

void prime_fact(ll n){
	vector<int> ans;ll x = n;
	for(int i = 2; i * i <= n; i++){while(x % i == 0){ans.push_back(i);x /= i;}}
	if(x > 1)ans.push_back(x);
}

void divisor(ll n){
    set<ll> ans;
    rep(i , 1 , sqrt(n) + 10){if(n % i == 0)ans.insert(i);if(i != (n / i))ans.insert(n / i);}
}

void solve(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i , 0 , n)cin >> a[i];
    sort(a.begin() , a.end());
    rep(i , 0 , n){
        cout << a[i];
        if(i != n - 1)cout << " ";
        else cout << endl;
    }
}

int main(){
	//cout << fixed << setprecision(20) << endl;
	cin.tie(0);
	ios::sync_with_stdio(false);
	//int t;cin >> t;for(int i = 0; i < t; i++)
	solve();
    return 0;
}
0