結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー chocoruskchocorusk
提出日時 2020-01-31 22:19:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,010 bytes
コンパイル時間 941 ms
コンパイル使用メモリ 110,036 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 10:16:27
合計ジャッジ時間 1,931 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
const ll MOD=1e9+7;
int main()
{
    cout<<"Alice"<<endl;
    return 0;
	int n;
	cin>>n;
	int a[300030];
	for(int i=0; i<n; i++){
		cin>>a[i];
	}
	vector<int> g[300030];
	for(int d=1; d<=300000; d++){
		for(int i=2; i<=300000/d; i++){
			g[d*i].push_back(d);
		}
	}
	int dp[300030]={};
	for(int i=0; i<n; i++){
		for(auto y:g[a[i]]){
			dp[a[i]]=max(dp[a[i]], dp[y]+1);
		}
	}
	int ans=1;
	for(int i=1; i<=300000; i++) ans=max(ans, dp[i]);
	cout<<ans<<endl;
	return 0;
}
0