結果

問題 No.9005 実行時間/使用メモリテスト(テスト用)
ユーザー Lepton_s
提出日時 2018-02-21 13:32:14
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 102 ms / 3,000 ms
コード長 697 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 71,696 KB
最終ジャッジ日時 2025-01-05 08:24:14
ジャッジサーバーID
(参考情報)
judge3 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <iostream>
#include <vector>
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,a,b) for(ll (i)=a;(i)<(ll)(b);++(i))
#define rep(i,n) REP(i,0,n)
using namespace std;
const ull cycle_per_sec = 2800000000;
ull begin_cycle;
ull get_cycle(){
	unsigned int low, high;
	__asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
	return ((ull) low) | ((ull) high << 32);
}
double get_time(){
	return (double) (get_cycle() - begin_cycle)/cycle_per_sec;
}

int rec(int x){
	if(x<=0) return 0;
	else return rec(x-1)+rec(x-1);
}

int main(){
	begin_cycle = get_cycle();
	int n;
	cin>>n;
	rec(n*5+2);
	cout<<0<<endl;
	double t = get_time();
	cerr<<t<<endl;
	return 0;
}
0