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() | |
{ | |
string s; | |
cin>>s; | |
int n; | |
cin>>n; | |
n--; |
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() | |
{ | |
string s; | |
cin>>s; | |
int n; | |
cin>>n; |
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 InfiniteString { | |
public: | |
string equal(string s, string t) { | |
int i=0,j=0; | |
while(i<s.size() && j<t.size()) | |
{ | |
if(s[i]!=t[j]) | |
return "Not equal"; | |
if(i==s.size()-1 && j==t.size()-1) | |
break; |
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
<? var data = SpreadsheetApp | |
.openById('1BqDVWjXT5lYw6UKPcCXlnxPleMkfnwF1Dhe01Icbwdo') | |
.getActiveSheet() | |
.getDataRange() | |
.getValues(); ?> | |
<table border="1"><? for (var i = 0; i < data.length; i++) { ?> <? if(data[i][1]){ ?> | |
<tr><? for (var j = 0; j < data[i].length; j++) { ?> | |
<td><?= data[i][j] ?></td><? } ?> | |
</tr><? } ?> <? } ?> |
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
<? var data = SpreadsheetApp | |
.openById('1BqDVWjXT5lYw6UKPcCXlnxPleMkfnwF1Dhe01Icbwdo') | |
.getActiveSheet() | |
.getDataRange() | |
.getValues(); ?> | |
<table> | |
<? for (var i = 0; i < data.length; i++) { ?> | |
<tr> | |
<? for (var j = 0; j < data[i].length; j++) { ?> | |
<td><?= data[i][j] ?></td> |
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
function doGet() { | |
var title="スプレッドシートサンプル"; | |
return HtmlService.createTemplateFromFile('page').evaluate().setTitle(title); | |
} |
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
function parseRss(url) | |
{ | |
//引数で渡されたURLのRSSの解析 | |
var xml = UrlFetchApp.fetch(url).getContentText();; | |
var document = XmlService.parse(xml); | |
var root = document.getRootElement(); | |
var entries = document.getRootElement().getChild('channel').getChildren('item'); | |
//最新の記事のタイトルとURL | |
//更新のたびに通知される想定なので、必要なのはその時点での最も最新の記事情報のみ |
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
function doPost(e) { | |
//送信されたxmlの受け取り | |
var xml = e.postData.getDataAsString(); | |
var document = XmlService.parse(xml); | |
var root = document.getRootElement(); | |
var methodName = document.getRootElement().getChildren('methodName'); | |
var params = document.getRootElement().getChild('params').getChildren(); | |
//ブログ名 |
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
23c23 | |
< fastboot -w update image-hammerhead-lmy47d.zip | |
--- | |
> fastboot update image-hammerhead-lmy47d.zip |
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 ThePermutationGameDiv2 { | |
public: | |
long long int lcm(long long int a,long long int b) | |
{ | |
if (b==0 || a == 0 ) | |
return 0; | |
return ((a / gcd(a, b)) * b); | |
} | |
long long int gcd(long long int a,long long int b) |