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
host gateway | |
HostName sshgate.hoge | |
User hoge | |
host *-none | |
ProxyCommand none | |
Host LocalB-*-out | |
ProxyCommand ssh -W %h:%p Bgateway-out |
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
#!/bin/bash | |
trap 'rm -f "$TMPFILE"' EXIT | |
TARGETDIR="/home/USER/Downloads/" | |
TMPFILE=$(mktemp 2>/dev/null||mktemp -t tmp) | |
cd ${TARGETDIR} | |
ls . | grep -e "([1-9])" > ${TMPFILE} | |
while read difffile |
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
class AliceGameEasy { | |
public: | |
long long findMinimumValue(long long x, long long y) { | |
long long ans = 0; | |
long long sum = x+y,r=0,l=3037000490; | |
long long i=(r+l); | |
while(true) | |
{ | |
i=(r+l)/2; | |
if((i*(i+1))/2 == sum) |
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
class ElectronicPetEasy { | |
public: | |
string isDifficult(int st1, int p1, int t1, int st2, int p2, int t2) { | |
set<int> hash; | |
for(int i=0;i<t1;i++) | |
{ | |
hash.insert(st1+(i*p1)); | |
} | |
for(int i=0;i<t2;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> | |
using namespace std; | |
int main(void){ | |
int n,ans=0; | |
cin>>n; | |
for(int i=0;i<n;i++) | |
{ | |
int tmp; | |
cin>>tmp; | |
ans+=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> | |
#include <algorithm> | |
using namespace std; | |
int main(void){ | |
int n,ans=0; | |
cin>>n; | |
for(int i=0;i<n;i++) | |
{ | |
int t,s,p; | |
cin>>t>>s>>p; |
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(void){ | |
int t,n,ans=0; | |
cin>>t>>n; | |
int m[n+1]; | |
for(int i=0;i<t;i++) | |
{ | |
cin>>m[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<algorithm> | |
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
int m,d; | |
cin>>m>>d; | |
if(m%d) | |
cout<<"NO"<<endl; | |
else |
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<algorithm> | |
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
int a,b,c; | |
cin>>a>>b>>c; | |
if(a+b==c && a-b==c) | |
cout<<"?"<<endl; | |
else if(a+b==c) |
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<algorithm> | |
#include<iostream> | |
#include<cstring> | |
using namespace std; | |
int main() | |
{ | |
int n,m; | |
cin>>n>>m; | |
int a[m],b[m]; | |
for(int i=0;i<m;i++) |
OlderNewer