統合元帥曰く『百発百中の一砲能く百発一中の敵砲百門に対抗し得る』と言ってた。こいつを以下の通りモデル化する。
- 軍Aが命中率1%の砲を100門有し、軍Bが命中率100%の砲を1門有している。
- 互いに全く同じタイミングで砲撃を開始する。
- 攻撃の結果は命中か外れのいずれかに収束し、命中の場合は砲が破壊される。従って次回の砲撃には参加できない。
- 砲が破損した状態は存在せず健在か破壊されたかのいずれかとなる。
use std::marker::PhantomData; | |
pub trait TypeArgConverter<T, U> { | |
fn convert(scr: T) -> U; | |
} | |
pub trait AssociatedConverter { | |
type Target; | |
type Output; | |
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<style> | |
.step { | |
margin-bottom: 40px; | |
border-bottom: 2px solid black; |
use std::borrow::Borrow; | |
use std::cell::{Cell, Ref, RefCell, RefMut}; | |
#[derive(Debug)] | |
struct Sample(i32); | |
struct Envelope(Sample); | |
fn main() {} |
# はじめに | |
実際の入力文字は*RAW*でTextを出してみてください。 | |
# 改行 | |
このように、改行する前に半角スペースを2つ入れると | |
任意の場所で | |
改行できます。 |
using System; | |
using System.Collections.Generic; | |
using Xunit; | |
using Xunit.Sdk; | |
using ChainingAssertion; | |
namespace SharpSourceFinderCoreTests | |
{ | |
/// <summary> |
using static System.Console; | |
namespace Playground | |
{ | |
public class OuterClass | |
{ | |
public OuterClass(int value) => Value = value; | |
public int Value { get; } |
using System; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.Intrinsics; | |
using System.Runtime.Intrinsics.X86; | |
using static CSfmt.Defination; | |
namespace CSfmt | |
{ | |
public static unsafe class SfmtNative | |
{ |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleApp1 | |
{ | |
[MaxIterationCount(100_000)] | |
[CsvMeasurementsExporter] |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System; | |
namespace ConsoleApp1 | |
{ | |
public class DivBench | |
{ | |
const int Base = 3; | |
const int Threshold = 10_000_000; |