結果

問題 No.932 解法破綻!高橋君
コンテスト
ユーザー nii
提出日時 2019-11-29 21:42:23
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,173 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 636 ms
コンパイル使用メモリ 98,256 KB
最終ジャッジ日時 2026-05-15 02:35:45
合計ジャッジ時間 1,339 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp:20:8: error: 'uint32_t' does not name a type
   20 | inline uint32_t Xor128(){
      |        ^~~~~~~~
main.cpp:15:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   14 | #include <fstream>
  +++ |+#include <cstdint>
   15 | using namespace std;
main.cpp: In member function 'int64_t Timer::getcycle()':
main.cpp:36:17: error: 'uint32_t' was not declared in this scope
   36 |                 uint32_t low,high;
      |                 ^~~~~~~~
main.cpp:36:17: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
main.cpp:37:48: error: 'low' was not declared in this scope; did you mean 'pow'?
   37 |                 __asm__ volatile ("rdtsc":"=a"(low),"=d"(high));
      |                                                ^~~
      |                                                pow
main.cpp:37:58: error: 'high' was not declared in this scope
   37 |                 __asm__ volatile ("rdtsc":"=a"(low),"=d"(high));
      |                                                          ^~~~

ソースコード

diff #
raw source code

#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <string>
#include <cstring>
#include <numeric>
#include <iomanip>
#include <fstream>
using namespace std;
const long long inf=1e9+7;
const long long mod=1e9+7;
const int64_t CYCLES_PER_SEC=2800000000;
//
inline uint32_t Xor128(){
	static uint32_t x=123456789;
	static uint32_t y=362436069;
	static uint32_t z=521288629;
	static uint32_t w=88675123;
	uint32_t t=x^(x<<11);
	x=y;y=z;z=w;
	return w=(w^(w>>19))^(t^(t>>8));
}
struct Timer{
	int64_t start;
	Timer(){reset();}
	void reset(){start=getcycle();}
	void plus(double a){start-=(a*CYCLES_PER_SEC);}
	inline double get(){return (double)(getcycle()-start)/CYCLES_PER_SEC;}
	inline int64_t getcycle(){
		uint32_t low,high;
		__asm__ volatile ("rdtsc":"=a"(low),"=d"(high));
		return ((int64_t)low)|((int64_t)high<<32);
	}
};
//
int main(){
	string s;
	cin>>s;
	int now=0;
	bool f=true;
	while(now<s.size()){
		if(s[now]=='A'){
			now+=3;
		}else{
			f=false;
			break;
		}
	}
	if(f){
		cout<<"Done!"<<endl;
	}else{
		cout<<"Failed..."<<endl;
	}
	return 0;
}
0