This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file | |
* @brief 参加者が解答を記述するファイル。 | |
*/ | |
#include "HPCIncludes.hpp" | |
//#include "cstdio" | |
//---------------------------------------------------------- | |
using namespace hpc; // 名前空間が不必要な場合はこのように記述。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1: 126 | |
2: 37 | |
3: 349 | |
4: 883 | |
5: 615 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************* | |
SuperCon12: Template for input output procedures | |
file: sc12_template2E.cu | |
by S.Kishimoto and O.Watanabe Aug. 17, 2012 | |
ver.2 by T.Endo and A.Nukada Aug. 22, 2012 | |
Remark: @@@ for test/tentative statements | |
*********************************************************************/ | |
/********* Template Part (1) NO CHAGNGE FROM HERE **********/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lowlinkを再帰関数を使わずに求めるのはどうするのがいいだろうかと考えてみた。 | |
lowlink.cpp:再帰関数を使った普通のlowlink | |
lowlink1.cpp:再帰関数を使わないlowlink | |
lowlink2.cpp:再帰関数を使わないlowlinkその2 | |
/////////////////// lowlink /////////////////// | |
こんな感じに囲んであるのがlowlinkを求める部分。 | |
/////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<cstdio> | |
#include<algorithm> | |
#define fi first | |
#define se second | |
#define rep(i,n) for(int i = 0; i < n; i++) | |
#define rrep(i,n) for(int i = 1; i <= n; i++) | |
using namespace std; | |
typedef long long int ll; | |
typedef pair<int,int> P; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<cstdio> | |
#include<algorithm> | |
#include<cstdlib> | |
#define fi first | |
#define se second | |
#define rep(i,n) for(int i = 0; i < n; i++) | |
#define maxs(x,y) x = max(x,y); | |
#define mins(x,y) x = min(x,y); | |
#define pb push_back | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(){ | |
int a = 1, b = 1; | |
for( ; a < 1000000; a += b, b = a-b){ | |
printf("%d\n",a); | |
} | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<cstdio> | |
#include<algorithm> | |
#include<vector> | |
#define fi first | |
#define se second | |
#define rep(i,n) for(int i = 0; i < n; i++) | |
#define drep(i,n) for(int i = n-1; i >= 0; i--) | |
#define rng(a) a.begin(),a.end() | |
#define pb push_back | |
#define sz(x) (int)(x).size() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
typedef long long ll; | |
const int mod = 1000000007; | |
int ex(int x, int t) { | |
if (t == 0) return 1; | |
ll res = ex(x, t >> 1); | |
(res *= res) %= mod; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// includes and macros | |
// | |
#define rep(i,n) for(int i = 0; i < n; i++) | |
int main(){ | |
int n; | |
cin >> n; | |
//printf("%d\n",n); | |
if(n%4 == 0){ |
OlderNewer