This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
int number; | |
int i; | |
int max, min; | |
int score; | |
int count; |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#define TRUE 1 | |
#define FALSE 0 | |
int main(int argc, char *argv[]) | |
{ | |
FILE *in; | |
int a, d, n; |
This file contains hidden or 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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
import javax.xml.parsers.DocumentBuilder; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import org.w3c.dom.Document; | |
import org.w3c.dom.Element; | |
import org.w3c.dom.Node; |
This file contains hidden or 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
# | |
# There exist several targets which are by default empty and which can be | |
# used for execution of your targets. These targets are usually executed | |
# before and after some main targets. They are: | |
# | |
# .build-pre: called before 'build' target | |
# .build-post: called after 'build' target | |
# .clean-pre: called before 'clean' target | |
# .clean-post: called after 'clean' target | |
# .clobber-pre: called before 'clobber' target |
This file contains hidden or 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
# | |
# There exist several targets which are by default empty and which can be | |
# used for execution of your targets. These targets are usually executed | |
# before and after some main targets. They are: | |
# | |
# .build-pre: called before 'build' target | |
# .build-post: called after 'build' target | |
# .clean-pre: called before 'clean' target | |
# .clean-post: called after 'clean' target | |
# .clobber-pre: called before 'clobber' target |
This file contains hidden or 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
# | |
# There exist several targets which are by default empty and which can be | |
# used for execution of your targets. These targets are usually executed | |
# before and after some main targets. They are: | |
# | |
# .build-pre: called before 'build' target | |
# .build-post: called after 'build' target | |
# .clean-pre: called before 'clean' target | |
# .clean-post: called after 'clean' target | |
# .clobber-pre: called before 'clobber' target |
This file contains hidden or 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
# | |
# There exist several targets which are by default empty and which can be | |
# used for execution of your targets. These targets are usually executed | |
# before and after some main targets. They are: | |
# | |
# .build-pre: called before 'build' target | |
# .build-post: called after 'build' target | |
# .clean-pre: called before 'clean' target | |
# .clean-post: called after 'clean' target | |
# .clobber-pre: called before 'clobber' target |
This file contains hidden or 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
package jp.ac.oka_pu.icpc2005tokyo; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class A { | |
class Prime { |
This file contains hidden or 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
fun subst src dst s = | |
let | |
open Substring | |
fun subst_sub src dst ss = | |
let | |
val (pref, suff) = position src ss | |
in | |
if isEmpty suff (* not found *) | |
then [pref] | |
else pref :: (full dst) :: |
This file contains hidden or 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
fun sort _ nil = nil | |
| sort f (xl as x::xs) = sort f (List.filter (fn y => f y x = LESS) xs) | |
@ (List.filter (fn y => f y x = EQUAL) xl) | |
@ sort f (List.filter (fn y => f y x = GREATER) xs); | |
fun compare x y = | |
if x < y then LESS | |
else if x > y then GREATER | |
else EQUAL; |