結果
| 問題 | No.2593 Reorder and Mod 120 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-22 21:38:05 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 411 bytes |
| 記録 | |
| コンパイル時間 | 3,766 ms |
| コンパイル使用メモリ | 355,248 KB |
| 実行使用メモリ | 9,924 KB |
| 最終ジャッジ日時 | 2026-09-22 21:38:11 |
| 合計ジャッジ時間 | 5,623 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 WA * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
string S;
cin >> N >> S;
vector<int> C(10, 0);
for (char c : S) C[c-'0']++;
int ans = 0;
for (int n = 0; n < 1000; n++){
auto c = C;
bool ok = true;
c[n%10]--, c[(n/10)%10]--, c[n/100]--;
for (int x : c) if (x < 0) ok = false;
if (ok) ans++;
}
cout << ans << endl;
}