Skip to content

Instantly share code, notes, and snippets.

View LightBells's full-sized avatar
🏠
Working from home

Nautilus LightBells

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lightbells on github.
  • I am lightbells (https://keybase.io/lightbells) on keybase.
  • I have a public key ASCbTsDP8MyBYCjKlmb50h7fLxT_ofrNcW5g3qjrW4mw4Ao

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am lightbells on github.
  • I am lightbells (https://keybase.io/lightbells) on keybase.
  • I have a public key ASAXDotr3mcMhYEvwJ_x7S8VHxlyTRGrQl1dXfXUlXWDNgo

To claim this, I am signing this object:

@LightBells
LightBells / キュー
Last active July 15, 2020 15:10 — forked from riku1314/キュー
#include <stdio.h>
#include <stdlib.h>
#define ID "s1270096"
#define NAME "Hikaru Takahashi"
//----------------------------------
typedef enum { OK, EMPTY, FULL } result_t;
// キューの要素(ノード)を表す構造体
@LightBells
LightBells / jikken.h
Last active June 21, 2020 14:11 — forked from riku1314/jikken.h
B-1
extern void make_matrix(unsigned int size, int flag,double ***a,double ***b,unsigned int number)
{
int i,j;
*a=(double**)malloc(sizeof(double*)*size);
*b=(double**)malloc(sizeof(double*)*size);
for(i=0;i<size;i++){
(*a)[i] = (double*)malloc(sizeof(double)*size);
(*b)[i] = (double*)malloc(sizeof(double)*size);
for(j=0;j<size;j++){
(*a)[i][j]=flag;
#include <stdio.h>
#include <net/if.h>
#include <net/ethernet.h>
void *mac_ntoa(u_char *d){
static char str[18];
sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x\n", d[0], d[1],d[2],d[3],d[4],d[5]);
return str;
}
@LightBells
LightBells / primeJudgement.cpp
Last active May 20, 2019 10:48
PrimeJudgement
#include <stdio.h>
#define FALSE 0
#define TRUE 1
int main(){
bool isNotPrime = FALSE;
for (int i=2 ; i <= 1000 ; i++) {
for (int j=2 ; j < i ; j++){
if ( i%j == 0 ){
isNotPrime = TRUE;
@LightBells
LightBells / Code.gs
Created April 2, 2019 13:32
Code.gs
var LINE_ACCESS_TOKEN = 'unQaRFjsqnnhwMbU0SEHsJGM6vWwtGtDhv8Z9LseWdp'
function makeRead(){
contestRegister();
importantNotify();
var myThreads = GmailApp.search('is:unread', 0, 100);
var myMessages = GmailApp.getMessagesForThreads(myThreads);
for (var i in myMessages){
for (var j in myMessages[i]){
#include <bits/stdc++.h>using namespace std;
char px[1000][1001];int n;
bool issymmetry();void diff(int,int);
int main(void){    int c,count=0;    cin >> c >> n;    for(int i=0;i<n;i++)        cin >> px[i];            for(int i=0;i<c;i++){        int d;        cin >> d;        for(int j=0;j<d && i!=0;j++){            int x,y;            cin >> y >> x;            px[y-1][x-1] = (px[y-1][x-1]=='0')?'1':'0';        }        count+=issymmetry();    }    cout << count << endl;}
bool issymmetry(){    for(int i=0;i<n;i++){        for(int j=0;j<n;j++){            if(px[i][j]!=px[i][(n-1)-j])                return false;            if(px[(n-1)-i][j]!=px[i][j])                return false;        }    }    return true;}