結果
問題 | No.473 和と積の和 |
ユーザー | tails |
提出日時 | 2016-12-23 03:42:57 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 700 bytes |
コンパイル時間 | 1,753 ms |
コンパイル使用メモリ | 181,148 KB |
実行使用メモリ | 733,732 KB |
最終ジャッジ日時 | 2024-05-09 13:25:49 |
合計ジャッジ時間 | 7,755 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,812 KB |
testcase_01 | AC | 2 ms
6,944 KB |
testcase_02 | AC | 2 ms
6,944 KB |
testcase_03 | AC | 1,049 ms
160,384 KB |
testcase_04 | AC | 2 ms
6,940 KB |
testcase_05 | AC | 2 ms
6,944 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 2 ms
6,944 KB |
testcase_08 | AC | 2 ms
6,944 KB |
testcase_09 | AC | 2 ms
6,940 KB |
testcase_10 | AC | 2 ms
6,940 KB |
testcase_11 | AC | 2 ms
6,944 KB |
testcase_12 | AC | 2 ms
6,940 KB |
testcase_13 | AC | 2 ms
6,948 KB |
testcase_14 | AC | 2 ms
6,944 KB |
testcase_15 | AC | 2 ms
6,940 KB |
testcase_16 | AC | 2 ms
6,940 KB |
testcase_17 | AC | 2 ms
6,940 KB |
testcase_18 | AC | 2 ms
6,944 KB |
testcase_19 | AC | 1 ms
6,940 KB |
testcase_20 | AC | 2 ms
6,940 KB |
testcase_21 | AC | 2 ms
6,940 KB |
testcase_22 | AC | 1 ms
6,940 KB |
testcase_23 | AC | 4 ms
6,940 KB |
testcase_24 | AC | 10 ms
6,940 KB |
testcase_25 | MLE | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
testcase_46 | -- | - |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~
ソースコード
#include <bits/stdc++.h> using namespace std; main(){ int n,x; scanf("%d%d",&n,&x); ++x; vector<int> v; for(int i=2;i*i<=x;){ if(x%i==0){ v.push_back(i); x/=i; }else{ ++i; } } v.push_back(x); int r=0; if(v.size()>=n){ multiset<int> m; for(int i=0;i<n;++i){ m.insert(1); } set<multiset<int>> s1,s2; s1.insert(m); for(int vi:v){ for(multiset<int> const& m1:s1){ int l=0; for(int a:m1){ if(a!=l){ l=a; multiset<int> m2=m1; m2.erase(m2.find(a)); m2.insert(a*vi); s2.insert(m2); } } } s1.swap(s2);s2.clear(); } for(multiset<int> const& m1:s1){ r+=m1.find(1)==m1.end(); } } printf("%d\n",r); }