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
| using System; | |
| public class CF_285B | |
| { | |
| public int solve(int[] p, int s, int t) | |
| { | |
| s--; t--; | |
| for (int i = 0; i < p.Length; p[i]--, i++) { } | |
| int cp = s; | |
| int numelems = 0; |
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
| using System; | |
| public class CF_755A | |
| { | |
| static int Main(string[] args) | |
| { | |
| uint n = Convert.ToUInt32(Console.ReadLine()); | |
| Console.WriteLine(new CF_755A().solve(n)); | |
| return 0; | |
| } |
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 std.stdio; | |
| import core.stdc.stdio; | |
| import std.string; | |
| import std.algorithm; | |
| public class Item | |
| { | |
| public int value; | |
| public int weight; | |
| } |
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 std.stdio; | |
| import std.uni; | |
| import std.string; | |
| import core.stdc.stdio; | |
| import std.array; | |
| import std.algorithm; | |
| import std.string; | |
| import std.math; | |
| class Summator |
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
| template <class Fun> | |
| class ScopeGuard { | |
| Fun f_; | |
| bool active_; | |
| public: | |
| ScopeGuard(Fun f) | |
| : f_(std::move(f)) | |
| , active_(true) { | |
| } | |
| ~ScopeGuard() { if (active_) f_(); } |
NewerOlder