結果
| 問題 | No.55 正方形を描くだけの簡単なお仕事です。 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-20 18:14:21 |
| 言語 | Kuin (KuinC++ v.2021.9.17) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 859 bytes |
| 記録 | |
| コンパイル時間 | 1,464 ms |
| コンパイル使用メモリ | 167,000 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-05 17:03:37 |
| 合計ジャッジ時間 | 2,114 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 |
コンパイルメッセージ
out.cpp:676:14: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'std::shared_ptr<k_an>' [-Wnontrivial-memcall]
676 | memset(r->B, 0, sizeof(T) * static_cast<std::size_t>(h + bufLen_<T>()));
| ^
out.cpp:688:9: note: in instantiation of function template specialization 'newArraysRec_<std::shared_ptr<Array_<std::shared_ptr<k_an>>>>::operator()<long long>' requested here
688 | return newArraysRec_<T>()(std::forward<A>(a)...);
| ^
out.cpp:1630:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<k_an>>>, long long>' requested here
1630 | (k_am) = (newArrays_<type_(Array_<type_(k_an)>)>((3LL)));
| ^
out.cpp:676:14: note: explicitly cast the pointer to silence this warning
676 | memset(r->B, 0, sizeof(T) * static_cast<std::size_t>(h + bufLen_<T>()));
| ^
| (void*)
1 warning generated.
ソースコード
func main()
var pos: []Pos :: #[3]Pos
for i(0, 2)
do pos[i] :: (#Pos).init(cui@inputInt(), cui@inputInt())
end for
for i(0, 2)
if(i <> 0)
var t: Pos :: ##pos[0]
do pos[0].init(pos[i].x, pos[i].y)
do pos[i].init(t.x, t.y)
end if
if((pos[1].x - pos[0].x) * (pos[2].x - pos[0].x) + (pos[1].y - pos[0].y) * (pos[2].y - pos[0].y) = 0)
if((pos[1].x - pos[0].x) ^ 2 + (pos[1].y - pos[0].y) ^ 2 = (pos[2].x - pos[0].x) ^ 2 + (pos[2].y - pos[0].y) ^ 2)
do cui@print("\{pos[2].x + pos[1].x - pos[0].x} \{pos[2].y + pos[1].y - pos[0].y}\n")
ret
end if
end if
end for
do cui@print("-1\n")
func swap(a: &Pos, b: &Pos)
var pos: Pos :: ##a
do a :: ##b
do b :: ##pos
end func
class Pos()
+var x: int
+var y: int
+func init(x: int, y: int): Pos
do me.x :: x
do me.y :: y
ret me
end func
end class
end func