This file contains 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; | |
int main(int argc, char const *argv[]) { | |
int n; | |
cin>>n; | |
int ans=0; | |
for(int i=0;i<n;i++){ | |
int a; | |
cin>>a; | |
while(a%2==0) a/=2,ans++; |
This file contains 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> | |
#include <algorithm> | |
#include <math.h> | |
using namespace std; | |
using ll = long long; | |
int main(int argc, char const *argv[]) { | |
int n; | |
cin>>n; | |
ll a[n]; | |
for(int i=0;i<n;i++){ |
This file contains 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> | |
#include <algorithm> | |
using namespace std; | |
int main(int argc, char const *argv[]) { | |
int n; | |
cin>>n; | |
int a[n],b[n]; | |
for(int i=0;i<n;i++){ | |
int tmp; | |
cin>>tmp; |
This file contains 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; | |
int main(int argc, char const *argv[]) { | |
int n; | |
cin>>n; | |
int a[n]; | |
int max=0; | |
for(int i=0;i<n;i++){ | |
int tmp; | |
cin>>tmp; |
This file contains 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; | |
int main(int argc, char const *argv[]) { | |
int n; | |
cin>>n; | |
int sum=0; | |
for(int i=0;i<n;i++){ | |
int tmp; | |
cin>>tmp; | |
sum+=tmp-1; |
This file contains 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; | |
int main(int argc, char const *argv[]) { | |
int h,w; | |
cin>>h>>w; | |
char a[h][w]; | |
for(int i=0;i<h;i++){ | |
for(int j=0;j<w;j++){ | |
cin>>a[i][j]; | |
} |
This file contains 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> | |
#include <math.h> | |
using namespace std; | |
int main(int argc, char const *argv[]) { | |
double x1,y1,x2,y2; | |
cin>>x1>>y1>>x2>>y2; | |
double dis,a,x3,y3,x4,y4; | |
dis=sqrt(pow(x1-x2,2)+pow(y1-y2,2)); | |
if(x1!=x2){ | |
a=(y1-y2)/(x1-x2); |
This file contains 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> | |
#include <math.h> | |
using namespace std; | |
int main(int argc, char const *argv[]) { | |
int n; | |
double t,a; | |
cin>>n>>t>>a; | |
double h,tem,min,ans; | |
for(int i=1;i<=n;i++){ | |
cin>>h; |
This file contains 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> | |
#include <vector> | |
#include <algorithm> | |
#include <climits> | |
using namespace std; | |
int main(int argc, char const *argv[]) { | |
int n,k; | |
cin>>n>>k; | |
vector<int> v(n); | |
for(int i=0;i<n;i++){ |
This file contains 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> | |
#include<string> //keyとnonceをstringで取るため、苦肉の策。いい方法あったら教えて下さい。 | |
##include <stdexcept> //例外処理用 | |
using namespace std; | |
//chachaのquaterrroundの実装 | |
#define ROTL(a,b) ((a)<<(b)) | ((a)) >> (32 - (b)))) | |
#define QR(a,b,c,d) ( | |
a += b, d ^= a, d = ROTL(d,16), | |
c += d, b ^= c, b = ROTL(b,12), |
OlderNewer