- 競技プログラミングでは、std::cin で値を入力するのが一般的である
- 問題の制約上、小さな値 (例: 0 < N < 100 とか)は、uint8_t で扱えそう、と思ったりする人がいるかもしれないが、ここに罠がある
- uint8_t な変数に std::cin すると、ビットパターンは char になる。少なくとも gcc (libstdc++) の環境では。
- 他の処理系だと異なる動きをするかもしれない
- なので、数値と比較すると思ったように動作しない
- uint8_t な変数に std::cin すると、ビットパターンは char になる。少なくとも gcc (libstdc++) の環境では。
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
package org.mumumu.test; | |
import java.io.ByteArrayOutputStream; | |
import magick.ImageInfo; | |
import magick.MagickImage; | |
import org.apache.sanselan.Sanselan; | |
import org.apache.sanselan.common.IImageMetadata; | |
import org.apache.sanselan.formats.jpeg.JpegImageMetadata; |
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
diff --git a/package.xml b/package.xml | |
index 3a12e98..1a65719 100644 | |
--- a/package.xml | |
+++ b/package.xml | |
@@ -66,8 +66,8 @@ | |
<api>1.1.0</api> | |
</version> | |
<stability> | |
- <release>snapshot</release> | |
- <api>snapshot</api> |
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
<?php | |
// | |
// requirement | |
// | |
// - PHP 8 | |
// - nikic/PHP-Parser | |
// | |
require_once('vendor/autoload.php'); |
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
#!/usr/bin/env python | |
from sqlalchemy import create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String | |
from sqlalchemy.orm import sessionmaker | |
engine = create_engine('sqlite:///:memory:', echo=True) | |
Session = sessionmaker(bind=engine) | |
Base = declarative_base() |
人にメールを転送しつつ、自分のメールボックスに入れる maildropfilter(1) の設定。
下記では駄目
if (....)
{
NewerOlder