結果

問題 No.9005 実行時間/使用メモリテスト(テスト用)
ユーザー Lepton_sLepton_s
提出日時 2018-02-21 13:33:36
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 427 ms / 3,000 ms
コード長 698 bytes
コンパイル時間 1,384 ms
コンパイル使用メモリ 72,628 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-13 10:46:59
合計ジャッジ時間 1,571 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 3 ms
4,348 KB
testcase_03 AC 15 ms
4,348 KB
testcase_04 AC 427 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

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+4);
	cout<<0<<endl;
	double t = get_time();
	cerr<<t<<endl;
	return 0;
}
0