Skip to content

Instantly share code, notes, and snippets.

View farma11's full-sized avatar

farma11

  • Nagoya Institute of Technology
View GitHub Profile
@farma11
farma11 / UVa11995_01.cpp
Last active January 13, 2018 16:06
UVa #11995 I Can Guess the Data Structure!
#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <array>
#include <functional>
#include <vector>
using namespace std;
string table[5] = { "stack", "queue", "priority queue", "impossible", "not sure" };
@farma11
farma11 / ABC013C_01.cpp
Last active January 13, 2018 16:09
AtCoder Beginner Contest #013C – 節制
#include <iostream>
#include <algorithm>
using namespace std;
#define LL long long int
LL n, h;
LL a, b, c, d, e;
// 質素な食事の最低限の回数が求められる
inline LL minCheapFood(double x){
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <iomanip>
#include <sstream>
using namespace std;
@farma11
farma11 / ABC085C_01.cpp
Created January 22, 2018 06:16
AtCoder Beginner Contest #085 C - Otoshidama
#include <iostream>
#include <algorithm>
using namespace std;
enum {
B10 = 10000, B5 = 5000, B1 = 1000
};
inline bool isCorrect(int x10, int x5, int x1, int n, long y){
bool isPositive = ((x10 >= 0) && (x5 >= 0) && (x1 >=0));
import numpy as np
import matplotlib.pylab as plt
def sigmoid(x):
return 1 / (1 + np.exp(-x))
x = np.arange(-5.0, 5.0, 0.1) # -5.0から5.0まで0.1刻みで生成
y = sigmoid(x)
plt.plot(x, y)
#include <iostream>
using namespace std;
int main() {
int n, balls[10]; cin >> n;
while(n--){
for(int i = 0; i < 10; i++) cin >> balls[i];
bool sortable = false;
for(int i = 0; i < (1 << 10); i++){
@farma11
farma11 / navbar-sample.html
Last active February 12, 2018 14:59
Bootstrap4を用いたナビバー:右側に言語選択dropdownを追加バージョン
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">Bland</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<!-- 切替ボタンのアイコン -->
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">