提出 #73582810


ソースコード 拡げる

#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif

#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;

using ll = long long;            // 2^63-1まで 負の値は可
using ull = unsigned long long;  // 0 <= ull <=2^64-1の範囲 負の値は不可
using vl = vector<ll>;
using vvl = vector<vl>;
using P = pair<ll, ll>;
template <typename T>
using MNPQ = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
using MXPQ = priority_queue<T, vector<T>, less<T>>;

#define rep(i, n) for (int i = 0; i < n; i++)
#define srep(i, s, n) for (int i = s; i < n; i++)
#define rrep(i, s, n) for (int i = s; i > n; i--)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define nall(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define vunique(v) v.erase(unique(nall(v)), v.end())
#define IN(a, x) find(nall(a), x) != a.end()
#define YN(flg) cout << (flg ? "Yes" : "No") << "\n"
#define out_grid(x, y, h, w) !(0 <= x && x < h && 0 <= y && y < w)
#define lmd(...) [&](__VA_ARGS__)
#define debug(x) cerr << #x << " = " << x << endl;
const ll INF = 4e18;

template <typename T>
istream& operator>>(istream& is, vector<T>& a) {
    for (auto& x : a) is >> x;
    return is;
}

template <typename T>
ostream& operator<<(ostream& os, vector<T>& a) {
    for (int i = 0; i < (int)a.size(); i++) os << a[i] << " ";
    return os;
}

template <typename T1, typename T2>
ostream& operator<<(ostream& os, pair<T1, T2>& p) {
    os << "{" << p.first << "," << p.second << "}";
    return os;
}

template <typename K, typename V>
ostream& operator<<(ostream& os, map<K, V>& a) {
    for (auto& [k, v] : a) os << "{key:" << k << ", item:" << v << "} ";
    return os;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    ll n;
    cin >> n;
    vector<pair<ll, ll>> ans(n);
    rep(i, n) ans[i].second = i + 1;
    rep(i, n) {
        string s;
        cin >> s;
        rep(j, n) {
            if (s[j] == 'o') ans[i].first--;
        }
    }
    sort(nall(ans));
    rep(i, n) cout << ans[i].second << endl;

    return 0;
}

提出情報

提出日時
問題 C - Round-Robin Tournament
ユーザ fuguriris
言語 C++23 (GCC 15.2.0)
得点 200
コード長 2198 Byte
結果 AC
実行時間 1 ms
メモリ 3640 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 12
セット名 テストケース
Sample 00_sample_01.txt, 00_sample_02.txt
All 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt
ケース名 結果 実行時間 メモリ
00_sample_01.txt AC 1 ms 3576 KiB
00_sample_02.txt AC 1 ms 3604 KiB
01_test_01.txt AC 1 ms 3576 KiB
01_test_02.txt AC 1 ms 3640 KiB
01_test_03.txt AC 1 ms 3504 KiB
01_test_04.txt AC 1 ms 3508 KiB
01_test_05.txt AC 1 ms 3624 KiB
01_test_06.txt AC 1 ms 3420 KiB
01_test_07.txt AC 1 ms 3508 KiB
01_test_08.txt AC 1 ms 3504 KiB
01_test_09.txt AC 1 ms 3568 KiB
01_test_10.txt AC 1 ms 3604 KiB