Submission #1192140
Source Code Expand
// need
#include <iostream>
#include <algorithm>
// data structure
#include <bitset>
//#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
//#include <array>
//#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <complex>
//#include <deque>
#include<valarray>
// stream
//#include <istream>
//#include <sstream>
//#include <ostream>
// etc
#include <cassert>
#include <functional>
#include <iomanip>
//#include <typeinfo>
#include <chrono>
#include <random>
#include <numeric>
#define INIT std::ios::sync_with_stdio(false);std::cin.tie(0);
#define VAR(type, ...)type __VA_ARGS__;MACRO_VAR_Scan(__VA_ARGS__);
template<typename T> void MACRO_VAR_Scan(T& t) { std::cin >> t; }
template<typename First, typename...Rest>void MACRO_VAR_Scan(First& first, Rest&...rest) { std::cin >> first; MACRO_VAR_Scan(rest...); }
#define VEC_ROW(type, n, ...)std::vector<type> __VA_ARGS__;MACRO_VEC_ROW_Init(n, __VA_ARGS__); for(int i=0; i<n; ++i){MACRO_VEC_ROW_Scan(i, __VA_ARGS__);}
template<typename T> void MACRO_VEC_ROW_Init(int n, T& t) { t.resize(n); }
template<typename First, typename...Rest>void MACRO_VEC_ROW_Init(int n, First& first, Rest&...rest) { first.resize(n); MACRO_VEC_ROW_Init(n, rest...); }
template<typename T> void MACRO_VEC_ROW_Scan(int p, T& t) { std::cin >> t[p]; }
template<typename First, typename...Rest>void MACRO_VEC_ROW_Scan(int p, First& first, Rest&...rest) { std::cin >> first[p]; MACRO_VEC_ROW_Scan(p, rest...); }
#define OUT(d) std::cout<<d;
#define FOUT(n, d) std::cout<<std::fixed<<std::setprecision(n)<<d;
#define SOUT(n, c, d) std::cout<<std::setw(n)<<std::setfill(c)<<d;
#define SP std::cout<<" ";
#define TAB std::cout<<"\t";
#define BR std::cout<<"\n";
#define ENDL std::cout<<std::endl;
#define FLUSH std::cout<<std::flush;
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define MAT(type, c, m, n) std::vector<std::vector<type>> c(m, std::vector<type>(n));for(auto& r:c)for(auto& i:r)std::cin>>i;
#define ALL(a) (a).begin(),(a).end()
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RFOR(i, a, b) for(int i=(b)-1;i>=(a);--i)
#define REP(i, n) for(int i=0;i<int(n);++i)
#define RREP(i, n) for(int i=(n)-1;i>=0;--i)
#define FORLL(i, a, b) for(ll i=ll(a);i<ll(b);++i)
#define RFORLL(i, a, b) for(ll i=ll(b)-1;i>=ll(a);--i)
#define REPLL(i, n) for(ll i=0;i<ll(n);++i)
#define RREPLL(i, n) for(ll i=ll(n)-1;i>=0;--i)
#define PAIR std::pair<int, int>
#define PAIRLL std::pair<ll, ll>
#define IN(a, x, b) (a<=x && x<b)
#define SHOW(d) {std::cerr << #d << "\t:" << d << "\n";}
#define SHOWVECTOR(v) {std::cerr << #v << "\t:";for(const auto& xxx : v){std::cerr << xxx << " ";}std::cerr << "\n";}
#define SHOWVECTOR2(v) {std::cerr << #v << "\t:\n";for(const auto& xxx : v){for(const auto& yyy : xxx){std::cerr << yyy << " ";}std::cerr << "\n";}}
#define SHOWPAIR(p) {std::cerr << #p << "\t:(" << p.first << ",\t" << p.second << ")\n";}
#define SHOWPAIRVECTOR2(v) {std::cerr << #v << "\t:\n";for(const auto& xxx : v){for(const auto& yyy : xxx){std::cerr<<'('<<yyy.first<<", "<<yyy.second<<") ";}std::cerr << "\n";}}
#define SHOWPAIRVECTOR(v) {for(const auto& xxx:v){std::cerr<<'('<<xxx.first<<", "<<xxx.second<<") ";}std::cerr<<"\n";}
#define SHOWQUEUE(a) {std::queue<decltype(a.front())> tmp(a);std::cerr << #a << "\t:";for(int i=0; i<static_cast<int>(a.size()); ++i){std::cerr << tmp.front() << "\n";tmp.pop();}std::cerr << "\n";}
template<typename T> inline T CHMAX(T& a, const T b) { return a = (a < b) ? b : a; }
template<typename T> inline T CHMIN(T& a, const T b) { return a = (a > b) ? b : a; }
#define EXCEPTION(msg) throw std::string("Exception : " msg " [ in ") + __func__ + " : " + std::to_string(__LINE__) + " lines ]"
#define TRY(cond, msg) try {if (cond) EXCEPTION(msg);}catch (std::string s) {std::cerr << s << std::endl;}
void CHECKTIME(std::function<void()> f) { auto start = std::chrono::system_clock::now(); f(); auto end = std::chrono::system_clock::now(); auto res = std::chrono::duration_cast<std::chrono::nanoseconds>((end - start)).count(); std::cerr << "[Time:" << res << "ns (" << res / (1.0e9) << "s)]\n"; }
#define int ll
using ll = long long;
using ull = unsigned long long;
constexpr int INFINT = 1 << 30; // 1.07x10^ 9
constexpr int INFINT_LIM = (1LL << 31) - 1; // 2.15x10^ 9
constexpr ll INFLL = 1LL << 60; // 1.15x10^18
constexpr ll INFLL_LIM = (1LL << 62) - 1 + (1LL << 62); // 9.22x10^18
constexpr double EPS = 1e-7;
constexpr int MOD = 1000000007;
constexpr double PI = 3.141592653589793238462643383279;
signed main() {
INIT;
int n = 300;
VEC_ROW(int, n, x, y);
using P = std::pair<std::pair<int, int>, int>;
std::vector<P> p(n);
REP(i, n) {
p[i] = P(PAIR(x[i], y[i]), i+1);
}
std::sort(ALL(p));
OUT(100)BR;
REP(i, n) {
OUT(p[i].second);
if (i % 3 == 2) {
BR;
}
else {
SP;
}
}
return 0;
}
Submission Info
Submission Time |
|
Task |
A - 役人 |
User |
satanic0258 |
Language |
C++14 (GCC 5.4.1) |
Score |
100 |
Code Size |
5094 Byte |
Status |
AC |
Exec Time |
1 ms |
Memory |
256 KB |
Judge Result
Set Name |
Subtask00 |
Subtask01 |
Subtask02 |
Subtask03 |
Subtask04 |
Subtask05 |
Subtask06 |
Subtask07 |
Subtask08 |
Subtask09 |
Subtask10 |
Subtask11 |
Subtask12 |
Subtask13 |
Subtask14 |
Subtask15 |
Subtask16 |
Subtask17 |
Subtask18 |
Subtask19 |
Subtask20 |
Subtask21 |
Subtask22 |
Subtask23 |
Subtask24 |
Subtask25 |
Subtask26 |
Subtask27 |
Subtask28 |
Subtask29 |
Subtask30 |
Subtask31 |
Subtask32 |
Subtask33 |
Subtask34 |
Subtask35 |
Subtask36 |
Subtask37 |
Subtask38 |
Subtask39 |
Subtask40 |
Subtask41 |
Subtask42 |
Subtask43 |
Subtask44 |
Subtask45 |
Subtask46 |
Subtask47 |
Subtask48 |
Subtask49 |
Subtask50 |
Subtask51 |
Subtask52 |
Subtask53 |
Subtask54 |
Subtask55 |
Subtask56 |
Subtask57 |
Subtask58 |
Subtask59 |
Subtask60 |
Subtask61 |
Subtask62 |
Subtask63 |
Subtask64 |
Subtask65 |
Subtask66 |
Subtask67 |
Subtask68 |
Subtask69 |
Subtask70 |
Subtask71 |
Subtask72 |
Subtask73 |
Subtask74 |
Subtask75 |
Subtask76 |
Subtask77 |
Subtask78 |
Subtask79 |
Subtask80 |
Subtask81 |
Subtask82 |
Subtask83 |
Subtask84 |
Subtask85 |
Subtask86 |
Subtask87 |
Subtask88 |
Subtask89 |
Subtask90 |
Subtask91 |
Subtask92 |
Subtask93 |
Subtask94 |
Subtask95 |
Subtask96 |
Subtask97 |
Subtask98 |
Subtask99 |
Score / Max Score |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
1 / 1 |
Status |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set Name |
Test Cases |
Subtask00 |
11_rand00.txt |
Subtask01 |
11_rand01.txt |
Subtask02 |
11_rand02.txt |
Subtask03 |
11_rand03.txt |
Subtask04 |
11_rand04.txt |
Subtask05 |
11_rand05.txt |
Subtask06 |
11_rand06.txt |
Subtask07 |
11_rand07.txt |
Subtask08 |
11_rand08.txt |
Subtask09 |
11_rand09.txt |
Subtask10 |
11_rand10.txt |
Subtask11 |
11_rand11.txt |
Subtask12 |
11_rand12.txt |
Subtask13 |
11_rand13.txt |
Subtask14 |
11_rand14.txt |
Subtask15 |
11_rand15.txt |
Subtask16 |
11_rand16.txt |
Subtask17 |
11_rand17.txt |
Subtask18 |
11_rand18.txt |
Subtask19 |
11_rand19.txt |
Subtask20 |
11_rand20.txt |
Subtask21 |
11_rand21.txt |
Subtask22 |
11_rand22.txt |
Subtask23 |
11_rand23.txt |
Subtask24 |
11_rand24.txt |
Subtask25 |
11_rand25.txt |
Subtask26 |
11_rand26.txt |
Subtask27 |
11_rand27.txt |
Subtask28 |
11_rand28.txt |
Subtask29 |
11_rand29.txt |
Subtask30 |
11_rand30.txt |
Subtask31 |
11_rand31.txt |
Subtask32 |
11_rand32.txt |
Subtask33 |
11_rand33.txt |
Subtask34 |
11_rand34.txt |
Subtask35 |
11_rand35.txt |
Subtask36 |
11_rand36.txt |
Subtask37 |
11_rand37.txt |
Subtask38 |
11_rand38.txt |
Subtask39 |
11_rand39.txt |
Subtask40 |
11_rand40.txt |
Subtask41 |
11_rand41.txt |
Subtask42 |
11_rand42.txt |
Subtask43 |
11_rand43.txt |
Subtask44 |
11_rand44.txt |
Subtask45 |
11_rand45.txt |
Subtask46 |
11_rand46.txt |
Subtask47 |
11_rand47.txt |
Subtask48 |
11_rand48.txt |
Subtask49 |
11_rand49.txt |
Subtask50 |
11_rand50.txt |
Subtask51 |
11_rand51.txt |
Subtask52 |
11_rand52.txt |
Subtask53 |
11_rand53.txt |
Subtask54 |
11_rand54.txt |
Subtask55 |
11_rand55.txt |
Subtask56 |
11_rand56.txt |
Subtask57 |
11_rand57.txt |
Subtask58 |
11_rand58.txt |
Subtask59 |
11_rand59.txt |
Subtask60 |
11_rand60.txt |
Subtask61 |
11_rand61.txt |
Subtask62 |
11_rand62.txt |
Subtask63 |
11_rand63.txt |
Subtask64 |
11_rand64.txt |
Subtask65 |
11_rand65.txt |
Subtask66 |
11_rand66.txt |
Subtask67 |
11_rand67.txt |
Subtask68 |
11_rand68.txt |
Subtask69 |
11_rand69.txt |
Subtask70 |
11_rand70.txt |
Subtask71 |
11_rand71.txt |
Subtask72 |
11_rand72.txt |
Subtask73 |
11_rand73.txt |
Subtask74 |
11_rand74.txt |
Subtask75 |
11_rand75.txt |
Subtask76 |
11_rand76.txt |
Subtask77 |
11_rand77.txt |
Subtask78 |
11_rand78.txt |
Subtask79 |
11_rand79.txt |
Subtask80 |
11_rand80.txt |
Subtask81 |
11_rand81.txt |
Subtask82 |
11_rand82.txt |
Subtask83 |
11_rand83.txt |
Subtask84 |
11_rand84.txt |
Subtask85 |
11_rand85.txt |
Subtask86 |
11_rand86.txt |
Subtask87 |
11_rand87.txt |
Subtask88 |
11_rand88.txt |
Subtask89 |
11_rand89.txt |
Subtask90 |
11_rand90.txt |
Subtask91 |
11_rand91.txt |
Subtask92 |
11_rand92.txt |
Subtask93 |
11_rand93.txt |
Subtask94 |
11_rand94.txt |
Subtask95 |
11_rand95.txt |
Subtask96 |
11_rand96.txt |
Subtask97 |
11_rand97.txt |
Subtask98 |
11_rand98.txt |
Subtask99 |
11_rand99.txt |
Case Name |
Status |
Exec Time |
Memory |
11_rand00.txt |
AC |
1 ms |
256 KB |
11_rand01.txt |
AC |
1 ms |
256 KB |
11_rand02.txt |
AC |
1 ms |
256 KB |
11_rand03.txt |
AC |
1 ms |
256 KB |
11_rand04.txt |
AC |
1 ms |
256 KB |
11_rand05.txt |
AC |
1 ms |
256 KB |
11_rand06.txt |
AC |
1 ms |
256 KB |
11_rand07.txt |
AC |
1 ms |
256 KB |
11_rand08.txt |
AC |
1 ms |
256 KB |
11_rand09.txt |
AC |
1 ms |
256 KB |
11_rand10.txt |
AC |
1 ms |
256 KB |
11_rand11.txt |
AC |
1 ms |
256 KB |
11_rand12.txt |
AC |
1 ms |
256 KB |
11_rand13.txt |
AC |
1 ms |
256 KB |
11_rand14.txt |
AC |
1 ms |
256 KB |
11_rand15.txt |
AC |
1 ms |
256 KB |
11_rand16.txt |
AC |
1 ms |
256 KB |
11_rand17.txt |
AC |
1 ms |
256 KB |
11_rand18.txt |
AC |
1 ms |
256 KB |
11_rand19.txt |
AC |
1 ms |
256 KB |
11_rand20.txt |
AC |
1 ms |
256 KB |
11_rand21.txt |
AC |
1 ms |
256 KB |
11_rand22.txt |
AC |
1 ms |
256 KB |
11_rand23.txt |
AC |
1 ms |
256 KB |
11_rand24.txt |
AC |
1 ms |
256 KB |
11_rand25.txt |
AC |
1 ms |
256 KB |
11_rand26.txt |
AC |
1 ms |
256 KB |
11_rand27.txt |
AC |
1 ms |
256 KB |
11_rand28.txt |
AC |
1 ms |
256 KB |
11_rand29.txt |
AC |
1 ms |
256 KB |
11_rand30.txt |
AC |
1 ms |
256 KB |
11_rand31.txt |
AC |
1 ms |
256 KB |
11_rand32.txt |
AC |
1 ms |
256 KB |
11_rand33.txt |
AC |
1 ms |
256 KB |
11_rand34.txt |
AC |
1 ms |
256 KB |
11_rand35.txt |
AC |
1 ms |
256 KB |
11_rand36.txt |
AC |
1 ms |
256 KB |
11_rand37.txt |
AC |
1 ms |
256 KB |
11_rand38.txt |
AC |
1 ms |
256 KB |
11_rand39.txt |
AC |
1 ms |
256 KB |
11_rand40.txt |
AC |
1 ms |
256 KB |
11_rand41.txt |
AC |
1 ms |
256 KB |
11_rand42.txt |
AC |
1 ms |
256 KB |
11_rand43.txt |
AC |
1 ms |
256 KB |
11_rand44.txt |
AC |
1 ms |
256 KB |
11_rand45.txt |
AC |
1 ms |
256 KB |
11_rand46.txt |
AC |
1 ms |
256 KB |
11_rand47.txt |
AC |
1 ms |
256 KB |
11_rand48.txt |
AC |
1 ms |
256 KB |
11_rand49.txt |
AC |
1 ms |
256 KB |
11_rand50.txt |
AC |
1 ms |
256 KB |
11_rand51.txt |
AC |
1 ms |
256 KB |
11_rand52.txt |
AC |
1 ms |
256 KB |
11_rand53.txt |
AC |
1 ms |
256 KB |
11_rand54.txt |
AC |
1 ms |
256 KB |
11_rand55.txt |
AC |
1 ms |
256 KB |
11_rand56.txt |
AC |
1 ms |
256 KB |
11_rand57.txt |
AC |
1 ms |
256 KB |
11_rand58.txt |
AC |
1 ms |
256 KB |
11_rand59.txt |
AC |
1 ms |
256 KB |
11_rand60.txt |
AC |
1 ms |
256 KB |
11_rand61.txt |
AC |
1 ms |
256 KB |
11_rand62.txt |
AC |
1 ms |
256 KB |
11_rand63.txt |
AC |
1 ms |
256 KB |
11_rand64.txt |
AC |
1 ms |
256 KB |
11_rand65.txt |
AC |
1 ms |
256 KB |
11_rand66.txt |
AC |
1 ms |
256 KB |
11_rand67.txt |
AC |
1 ms |
256 KB |
11_rand68.txt |
AC |
1 ms |
256 KB |
11_rand69.txt |
AC |
1 ms |
256 KB |
11_rand70.txt |
AC |
1 ms |
256 KB |
11_rand71.txt |
AC |
1 ms |
256 KB |
11_rand72.txt |
AC |
1 ms |
256 KB |
11_rand73.txt |
AC |
1 ms |
256 KB |
11_rand74.txt |
AC |
1 ms |
256 KB |
11_rand75.txt |
AC |
1 ms |
256 KB |
11_rand76.txt |
AC |
1 ms |
256 KB |
11_rand77.txt |
AC |
1 ms |
256 KB |
11_rand78.txt |
AC |
1 ms |
256 KB |
11_rand79.txt |
AC |
1 ms |
256 KB |
11_rand80.txt |
AC |
1 ms |
256 KB |
11_rand81.txt |
AC |
1 ms |
256 KB |
11_rand82.txt |
AC |
1 ms |
256 KB |
11_rand83.txt |
AC |
1 ms |
256 KB |
11_rand84.txt |
AC |
1 ms |
256 KB |
11_rand85.txt |
AC |
1 ms |
256 KB |
11_rand86.txt |
AC |
1 ms |
256 KB |
11_rand87.txt |
AC |
1 ms |
256 KB |
11_rand88.txt |
AC |
1 ms |
256 KB |
11_rand89.txt |
AC |
1 ms |
256 KB |
11_rand90.txt |
AC |
1 ms |
256 KB |
11_rand91.txt |
AC |
1 ms |
256 KB |
11_rand92.txt |
AC |
1 ms |
256 KB |
11_rand93.txt |
AC |
1 ms |
256 KB |
11_rand94.txt |
AC |
1 ms |
256 KB |
11_rand95.txt |
AC |
1 ms |
256 KB |
11_rand96.txt |
AC |
1 ms |
256 KB |
11_rand97.txt |
AC |
1 ms |
256 KB |
11_rand98.txt |
AC |
1 ms |
256 KB |
11_rand99.txt |
AC |
1 ms |
256 KB |