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
| public class InterestingNumber { | |
| // srm 611 div 2 | |
| public String isInteresting(String x) { | |
| // For each D between 0 and 9, inclusive, X either does not contain the | |
| // digit D at all, or it contains exactly two digits D, and there are | |
| // precisely D other digits between them. | |
| for (int i = 0; i <= 9; i++) { | |
| String line = x; |
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
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| public class LeftAndRightHandedDiv2 { | |
| // srm 612 div 2 | |
| public int count(String S) { | |
| // find number of "RL" in S | |
| int cpt = 0; | |
| Pattern regex = Pattern.compile("RL", Pattern.MULTILINE); |
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 bridge.services; | |
| public interface BridgeService extends /* refine */ LimitedRoadService { | |
| /** Observateur: nombre de véhicule sur le pont en direction de l'ile */ | |
| public int getNbIn(); | |
| /** Observateur: nombre de véhicule sur le pont en direction du continent */ | |
| public int getNbOut(); | |
| // inv: getNbCars() == getNbIn() + getNbOut() |
This file has been truncated, but you can view the full file.
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
| .file 1 "a.c" | |
| .section .mdebug.abi32 | |
| .previous | |
| .gnu_attribute 4, 1 | |
| .abicalls | |
| .comm caml_code_fragments_table,12,4 | |
| .comm caml_extern_sp,4,4 |
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
| /** | |
| * fib.java engendre par ml2java | |
| */ | |
| /** | |
| * de'claration de la fonction fib___1 | |
| * vue comme la classe : MLfun_fib___1 | |
| */ | |
| class MLfun_fib___1 extends MLfun { |
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
| int coin = 0; | |
| for (Coord c : coords) { | |
| if (coin==0) { | |
| previousNode = createOrUpdateNode(c, previousNode); | |
| System.err.println("Pile"); | |
| } else { | |
| System.err.println("Face"); | |
| } | |
| coin = (coin+1)%2; | |
| } |
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
| int coin = 0; | |
| for (List<Coord> l : coords) { | |
| if (coin==0) { | |
| List<MapNode> nodes = new ArrayList<MapNode>(); | |
| for (Coord c : l) { | |
| // make coordinates match sim map data | |
| if (mirror) { | |
| c.setLocation(c.getX(), -c.getY()); | |
| } | |
| c.translate(xOffset, yOffset); |
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
| # | |
| # Default settings for the simulation | |
| # | |
| ## Scenario settings | |
| Scenario.name = default_scenario | |
| Scenario.simulateConnections = true | |
| Scenario.updateInterval = 0.1 | |
| # 43200s == 12h | |
| Scenario.endTime = 43200 |
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
| @Override | |
| public Object clone(){ | |
| Zoo res = new Zoo(t.length); | |
| for(int i = 0; i<t.length; i++){ | |
| res.t[i] = new Cage(t[i]); | |
| } | |
| res.n = n; | |
| return res; | |
| } |
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 dict; | |
| import java.rmi.Remote; | |
| import java.rmi.RemoteException; | |
| public interface IRappel extends Remote { | |
| void done() throws RemoteException; | |
| void setResult(Object o) throws RemoteException; |